Remove gfxPSSurface and move its logic to a PrintTargetPS subclass of PrintTarget

RESOLVED FIXED in Firefox 50

Status

()

Core
Graphics
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

unspecified
mozilla50
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox50 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Created attachment 8760298 [details] [diff] [review]
patch

This patch:

 * Removes gfxPSSurface and moving its printing logic to a
   PrintTargetPS subclass of PrintTarget.

 * Converts the gfxPDFSurface consumers to PrintTargetPS.

 * Adds the cairo_surface_t* member to PrintTarget that all
   subclasses will set (except for PrintTargetThebes, which will
   be removed).

 * Adds the PrintTarget::MakeDrawTarget method which wraps the
   cairo_surface_t* member in a DrawTarget. Currently this is
   virtual purely so that PrintTargetThebes can override it, but
   once PrintTargetThebes goes away it should be made non-virtual.

 * Removes the SetDPI/GetDPI methods that nobody was using.

 * Removes PrintTargetThebes::RotateNeededForLandscape since no-one
   needs that any more.
Attachment #8760298 - Flags: review?(bas)
Created attachment 8760693 [details] [diff] [review]
patch

Now calls Finish() in the dtor to prevent crash.
Attachment #8760298 - Attachment is obsolete: true
Attachment #8760298 - Flags: review?(bas)
Attachment #8760693 - Flags: review?(bas)
Comment on attachment 8760693 [details] [diff] [review]
patch

Review of attachment 8760693 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/thebes/PrintTarget.cpp
@@ +18,3 @@
>    , mIsFinished(false)
>  {
> +#if 0

Why is this #if 0?
Attachment #8760693 - Flags: review?(bas) → review+
(In reply to Bas Schouten (:bas.schouten) from comment #2)
> ::: gfx/thebes/PrintTarget.cpp
> @@ +18,3 @@
> >    , mIsFinished(false)
> >  {
> > +#if 0
> 
> Why is this #if 0?

The comment "Once PrintTargetThebes is removed, enable this assertion" should give a clue. ;) PrintTargetThebes doesn't use the mCairoSurface member since it wraps its own mThebesSurface gfxASurface member.

Comment 4

2 years ago
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/136d378b0efe
Remove gfxPSSurface and move its logic to a PrintTargetPS subclass of PrintTarget. r=Bas

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/136d378b0efe
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.