aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-11-22 12:55:04 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-22 12:55:04 -0800
commit70d1554d8ea08ddb887550f98b9cfd0afd395d65 (patch)
treeb99f8d818833916ba175e70f6423d214b86dfa42
parent218ccfc86ba1cd13c1646f68ca40ff3021fe4292 (diff)
SkPDF: add `final` keyword to leaf classes
-rw-r--r--src/pdf/SkDeflate.h2
-rw-r--r--src/pdf/SkPDFBitmap.cpp6
-rw-r--r--src/pdf/SkPDFDevice.h2
-rw-r--r--src/pdf/SkPDFFontImpl.h8
-rw-r--r--src/pdf/SkPDFFormXObject.h2
-rw-r--r--src/pdf/SkPDFGraphicState.h2
-rw-r--r--src/pdf/SkPDFMetadata.cpp2
-rw-r--r--src/pdf/SkPDFShader.h6
-rw-r--r--src/pdf/SkPDFTypes.h6
9 files changed, 18 insertions, 18 deletions
diff --git a/src/pdf/SkDeflate.h b/src/pdf/SkDeflate.h
index d7323789a8..129d1bf8c3 100644
--- a/src/pdf/SkDeflate.h
+++ b/src/pdf/SkDeflate.h
@@ -21,7 +21,7 @@
*
* See http://en.wikipedia.org/wiki/DEFLATE
*/
-class SkDeflateWStream : public SkWStream {
+class SkDeflateWStream final : public SkWStream {
public:
/** Does not take ownership of the stream. */
SkDeflateWStream(SkWStream*);
diff --git a/src/pdf/SkPDFBitmap.cpp b/src/pdf/SkPDFBitmap.cpp
index 159c9e73a3..0c53da6974 100644
--- a/src/pdf/SkPDFBitmap.cpp
+++ b/src/pdf/SkPDFBitmap.cpp
@@ -380,7 +380,7 @@ static void emit_image_xobject(SkWStream* stream,
namespace {
// This SkPDFObject only outputs the alpha layer of the given bitmap.
-class PDFAlphaBitmap : public SkPDFObject {
+class PDFAlphaBitmap final : public SkPDFObject {
public:
PDFAlphaBitmap(const SkImage* image) : fImage(SkRef(image)) {}
~PDFAlphaBitmap() {}
@@ -399,7 +399,7 @@ private:
////////////////////////////////////////////////////////////////////////////////
namespace {
-class PDFDefaultBitmap : public SkPDFObject {
+class PDFDefaultBitmap final : public SkPDFObject {
public:
void emitObject(SkWStream* stream,
const SkPDFObjNumMap& objNumMap,
@@ -431,7 +431,7 @@ namespace {
* Grayscale JFIF Jpeg-encoded data that can be directly embedded
* into a PDF.
*/
-class PDFJpegBitmap : public SkPDFObject {
+class PDFJpegBitmap final : public SkPDFObject {
public:
SkISize fSize;
SkAutoTUnref<SkData> fData;
diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h
index 742e45ca5c..31f6de11ee 100644
--- a/src/pdf/SkPDFDevice.h
+++ b/src/pdf/SkPDFDevice.h
@@ -44,7 +44,7 @@ struct RectWithData;
The drawing context for the PDF backend.
*/
-class SkPDFDevice : public SkBaseDevice {
+class SkPDFDevice final : public SkBaseDevice {
public:
/** Create a PDF drawing context. SkPDFDevice applies a
* scale-and-translate transform to move the origin from the
diff --git a/src/pdf/SkPDFFontImpl.h b/src/pdf/SkPDFFontImpl.h
index f6684489b1..71f78bd4a6 100644
--- a/src/pdf/SkPDFFontImpl.h
+++ b/src/pdf/SkPDFFontImpl.h
@@ -12,7 +12,7 @@
#include "SkPDFFont.h"
-class SkPDFType0Font : public SkPDFFont {
+class SkPDFType0Font final : public SkPDFFont {
public:
virtual ~SkPDFType0Font();
bool multiByteGlyphs() const override { return true; }
@@ -36,7 +36,7 @@ private:
bool populate(const SkPDFGlyphSet* subset);
};
-class SkPDFCIDFont : public SkPDFFont {
+class SkPDFCIDFont final : public SkPDFFont {
public:
virtual ~SkPDFCIDFont();
virtual bool multiByteGlyphs() const { return true; }
@@ -53,7 +53,7 @@ private:
const SkTDArray<uint32_t>* subset);
};
-class SkPDFType1Font : public SkPDFFont {
+class SkPDFType1Font final : public SkPDFFont {
public:
virtual ~SkPDFType1Font();
virtual bool multiByteGlyphs() const { return false; }
@@ -72,7 +72,7 @@ private:
const SkAdvancedTypefaceMetrics::WidthRange* widthRangeEntry);
};
-class SkPDFType3Font : public SkPDFFont {
+class SkPDFType3Font final : public SkPDFFont {
public:
virtual ~SkPDFType3Font();
virtual bool multiByteGlyphs() const { return false; }
diff --git a/src/pdf/SkPDFFormXObject.h b/src/pdf/SkPDFFormXObject.h
index 4f903f65d3..32d9e40904 100644
--- a/src/pdf/SkPDFFormXObject.h
+++ b/src/pdf/SkPDFFormXObject.h
@@ -30,7 +30,7 @@ class SkPDFObjNumMap;
// The caller could keep track of the form XObjects it creates and
// canonicalize them, but the Skia API doesn't provide enough context to
// automatically do it (trivially).
-class SkPDFFormXObject : public SkPDFStream {
+class SkPDFFormXObject final : public SkPDFStream {
public:
/** Create a PDF form XObject. Entries for the dictionary entries are
* automatically added.
diff --git a/src/pdf/SkPDFGraphicState.h b/src/pdf/SkPDFGraphicState.h
index 45a32d430e..d816f72120 100644
--- a/src/pdf/SkPDFGraphicState.h
+++ b/src/pdf/SkPDFGraphicState.h
@@ -22,7 +22,7 @@ class SkPDFFormXObject;
be installed. So that a given dictionary is only output to the pdf file
once, we want to canonicalize them.
*/
-class SkPDFGraphicState : public SkPDFObject {
+class SkPDFGraphicState final : public SkPDFObject {
public:
enum SkPDFSMaskMode {
diff --git a/src/pdf/SkPDFMetadata.cpp b/src/pdf/SkPDFMetadata.cpp
index 4865deb11e..3f181f5d73 100644
--- a/src/pdf/SkPDFMetadata.cpp
+++ b/src/pdf/SkPDFMetadata.cpp
@@ -183,7 +183,7 @@ static SkString uuid_to_string(const SkPDFMetadata::UUID& uuid) {
#undef HEXIFY
namespace {
-class PDFXMLObject : public SkPDFObject {
+class PDFXMLObject final : public SkPDFObject {
public:
PDFXMLObject(SkString xml) : fXML(skstd::move(xml)) {}
void emitObject(SkWStream* stream,
diff --git a/src/pdf/SkPDFShader.h b/src/pdf/SkPDFShader.h
index 9380b57a72..3de17cdc50 100644
--- a/src/pdf/SkPDFShader.h
+++ b/src/pdf/SkPDFShader.h
@@ -50,7 +50,7 @@ public:
SkScalar rasterScale);
};
-class SkPDFFunctionShader : public SkPDFDict {
+class SkPDFFunctionShader final : public SkPDFDict {
public:
@@ -70,7 +70,7 @@ private:
* inside a tiling pattern while providing a common pattern interface.
* The encapsulation allows the use of a SMask for transparency gradients.
*/
-class SkPDFAlphaFunctionShader : public SkPDFStream {
+class SkPDFAlphaFunctionShader final : public SkPDFStream {
public:
static SkPDFAlphaFunctionShader* Create(SkPDFCanon*,
SkScalar dpi,
@@ -84,7 +84,7 @@ private:
typedef SkPDFStream INHERITED;
};
-class SkPDFImageShader : public SkPDFStream {
+class SkPDFImageShader final : public SkPDFStream {
public:
static SkPDFImageShader* Create(SkPDFCanon*,
SkScalar dpi,
diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h
index 0f029980b1..99320b1efc 100644
--- a/src/pdf/SkPDFTypes.h
+++ b/src/pdf/SkPDFTypes.h
@@ -168,7 +168,7 @@ static_assert(sizeof(SkString) == sizeof(void*), "SkString_size");
/** This class is a SkPDFUnion with SkPDFObject virtuals attached.
The only use case of this is when a non-compound PDF object is
referenced indirectly. */
-class SkPDFAtom : public SkPDFObject {
+class SkPDFAtom final : public SkPDFObject {
public:
void emitObject(SkWStream* stream,
const SkPDFObjNumMap& objNumMap,
@@ -188,7 +188,7 @@ private:
An array object in a PDF.
*/
-class SkPDFArray : public SkPDFObject {
+class SkPDFArray final : public SkPDFObject {
public:
static const int kMaxLen = 8191;
@@ -314,7 +314,7 @@ private:
descriptor). That is: no memory savings can be made by holding on
to a compressed version instead.
*/
-class SkPDFSharedStream : public SkPDFObject {
+class SkPDFSharedStream final : public SkPDFObject {
public:
// Takes ownership of asset.
SkPDFSharedStream(SkStreamAsset* data) : fAsset(data), fDict(new SkPDFDict) { SkASSERT(data); }