Closed Bug 1278276 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
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)
Attached patch patchSplinter Review
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.
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
https://hg.mozilla.org/mozilla-central/rev/136d378b0efe
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: