[poppler] Question on how to ensure API compatibility

Albert Astals Cid aacid at kde.org
Sun Aug 5 06:44:41 PDT 2012


El Diumenge, 5 d'agost de 2012, a les 15:30:13, Adam Reichold va escriure:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello again,
> 
> On 05.08.2012 15:20, Albert Astals Cid wrote:
> > El Diumenge, 5 d'agost de 2012, a les 13:15:54, Adam Reichold va
> > escriure: Hello everyone,
> > 
> > I am currently investigating how to enable the use of Thomas
> > Freitag's multi-threading patch via the Qt4 frontend. So far, I
> > think that calling displayPageSlice with fMT = true in
> > renderToImage and using a per-page SplashOutputDev for doing so
> > should suffice.
> > 
> > I would like to go about this by adding a parameter to
> > DocumentData::getOuputDev which forces creation of a new output
> > device instead of using the per-document one.
> > 
> > Now what I am unsure about is whether adding a parameter with
> > default value like "bool renderPerPage = false" to the
> > Page::renderToImage method would break API (or ABI) compatibility?
> > If so, would adding another overload adding this parameter help or
> > should I add another method which is then called by
> > Page::renderToImage?
> > 
> > Sorry, for these rather basic questions. I have no experience in
> > writing shared libraries.
> > 
> >> We do not care about API/ABI compatibility at the poppler/ level,
> >> we only care about it at the qt4/ glib/ cpp/ levels.
> 
> Exactly, that's why I am unsure whether I can change
> 
> QImage renderToImage(double xres=72.0, double yres=72.0, int x=-1, int
> y=-1, int w=-1, int h=-1, Rotation rotate = Rotate0) const;
> 
> to
> 
> QImage renderToImage(double xres=72.0, double yres=72.0, int x=-1, int
> y=-1, int w=-1, int h=-1, Rotation rotate = Rotate0, bool
> multiThreading = false) const;
> 
> in "Poppler::Page" defined in "qt4/src/poppler-qt4.h" without breaking
> something. Recompiling is obviously fine, but would applications that
> were linked against Poppler before that change still work?

No, they wouldn't.

Here a nice overview of the dos and donts. 
http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++

Cheers,
  Albert

> 
> Regards, Adam.
> 
> >> Cheers, Albert
> > 
> > Best regards, Adam.
> > 
> > P.S.: Of course doing so would keep setting render hints unlocked.
> > Personally, I think documenting this would be enough.
> > 
> >> _______________________________________________ poppler mailing
> >> list poppler at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/poppler
> > 
> > _______________________________________________ poppler mailing
> > list poppler at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/poppler
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.19 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iQEcBAEBAgAGBQJQHnVlAAoJEPSSjE3STU34kfsIAKWmfpEyBam6k/R6IKtMHnvB
> 40YaWJZk+KdDopHEUAmvhZn4SRSu2XSh9rpJXTzJsbKA/6EBhfTtsM5IHToQgzpW
> r631FDHc/PTfvA6maY+9vNEbb+gMOKczGmQAbfi/Jw+FlaJZdMWLha6TyOj9gjYa
> IepBCiAQMC1D6NLz/npbhpsR8ZlMDN0x+hPu2oTfvWMH2/AUbMfOFDYejYJ06LUy
> Hn/wg7KuegbpHv0LR+Yd3z5R3T70C2MP1Tzu7hNR5B5rfhS0GWkNOXz0upKfyIDu
> kAJxPmbDEEu8smKH2d9ktE2wPQ4myCL8WfrgF58ZZV3mJ1TTJ6z999jsu5qwais=
> =TDii
> -----END PGP SIGNATURE-----
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


More information about the poppler mailing list