Add Moz2D printing support

NEW
Unassigned

Status

()

5 years ago
5 years ago

People

(Reporter: jrmuizel, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
I"m not exactly sure what this will look like. There are a variety of different print apis that we want to potentially sit on top of:
- cairo
  - cairo_show_page(cr) or cairo_surface_show_page(surface)
- skia
  - has SkXPSDevice and SkPDFDocument. These don't share a common interface:
  -  xpsDev->beginPortfolio(&xps);
     xpsDev->beginSheet(unitsPerMeter, pixelsPerMeter, trimSize);
        invokeGM(gm, &c, false, false);
     xpsDev->endSheet();
     xpsDev->endPortfolio();

  -  SkPDFDevice* dev = NULL;
     dev = new SkPDFDevice(pageSize, pageSize, initialTransform);
     SkCanvas c(dev);
        invokeGM(gm, &c, true, false);

     SkPDFDocument doc;
     doc.appendPage(dev);
     doc.emitPDF(&pdf);

- direct2d
  - d2dPrintControl->AddPage(commandList)
- coregraphics
  - CGContextBeginPage,CGContextEndPage - although we currently use some cocoa thing that avoids needing to use these.

It doesn't seem like it will be too hard to come up with a simple interface that all of these can sit under.
(Reporter)

Updated

5 years ago
Blocks: 948503
You need to log in before you can comment on or make changes to this bug.