author Jean-Yves Avenard <>
Thu, 11 Apr 2019 12:36:51 +0000
changeset 469134 884f5dc55873c9345ee945cd6d5427e8ab398071
parent 449035 66eb1f485c1a3ea81372758bc92292c9428b17cd
permissions -rw-r--r--
Bug 1540581 - P6. Tidy some C++ declarations in gfx/. r=gerald,jrmuizel * Remove redundant virtual keywords * Mark all destructors of inheriting classes as virtual for clarity * Mark all classes without virtual destructor as final (exposed errors) * Make destructor virtual where it needed to be (some were missing) * Replace empty ({}) code declaration in header with = default * Remove virtual unused methods I probably missed some, it quickly became a rabbit hole. Differential Revision:

/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */


#include "nsCOMPtr.h"
#include "nsIOutputStream.h"
#include "PrintTarget.h"

namespace mozilla {
namespace gfx {

 * PDF printing target.
class PrintTargetPDF final : public PrintTarget {
  static already_AddRefed<PrintTargetPDF> CreateOrNull(
      nsIOutputStream* aStream, const IntSize& aSizeInPoints);

  nsresult EndPage() override;
  void Finish() override;

  PrintTargetPDF(cairo_surface_t* aCairoSurface, const IntSize& aSize,
                 nsIOutputStream* aStream);
  virtual ~PrintTargetPDF();

  nsCOMPtr<nsIOutputStream> mStream;

}  // namespace gfx
}  // namespace mozilla