SkPDF: add final
keyword to leaf classes
Review URL: https://codereview.chromium.org/1461403002
This commit is contained in:
parent
218ccfc86b
commit
70d1554d8e
@ -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*);
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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; }
|
||||
|
@ -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.
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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); }
|
||||
|
Loading…
Reference in New Issue
Block a user