Difference between revisions of "Mac OS X Porting - Canvas"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Introduction)
Line 16: Line 16:
  
 
Of the OOo applications using VCL, currently (September 2006) OOo Impress slideshow [http://marketing.openoffice.org/ooocon2006/schedule/general_abstracts.html#g11 has been converted to XCanvas], with prototypes working in Draw and Impress. Future work will include converting Calc and Writer.
 
Of the OOo applications using VCL, currently (September 2006) OOo Impress slideshow [http://marketing.openoffice.org/ooocon2006/schedule/general_abstracts.html#g11 has been converted to XCanvas], with prototypes working in Draw and Impress. Future work will include converting Calc and Writer.
 
  
 
NOTE: this work does not address the problem with native widgets and UI layout, only rendering. The UI Layout is discussed in [[UI Layout]] and details are in [[VCL UI Rework]].
 
NOTE: this work does not address the problem with native widgets and UI layout, only rendering. The UI Layout is discussed in [[UI Layout]] and details are in [[VCL UI Rework]].

Revision as of 17:46, 22 April 2008

Contributors

  • Mox Soini: Mox

Introduction

The current rendering framework in OpenOffice.org (OOo) is VCL. It is very Windows-oriented API that is hard to port to other platforms. Despite this, there are several ports available, including Unix/X11, Windows and Native Mac OS X port using Cocoa.

The future rendering framework in OpenOffice.org (OOo) is UNO XCanvas rendering framework. The benefits include a well designed API (easier to port, easier to use) and a more strong isolation of the API from the rest of the OOo (One of the big problems of the current VCL is that also the internals of the VCL are used from many places in the OOo code).

Currently the XCanvas implementation has been jump-started by directing text rendering back to VCL.

XCanvas is part of bigger module in OpenOffice, called Drawing Layer. There is initiative to improve the whole module: Drawing Layer/Drawing Primitives

For XCanvas information, see presentations at OOoCon 2006 (PDF, ODP, video/ogg) and OOoCon 2005 (PDF)

Of the OOo applications using VCL, currently (September 2006) OOo Impress slideshow has been converted to XCanvas, with prototypes working in Draw and Impress. Future work will include converting Calc and Writer.

NOTE: this work does not address the problem with native widgets and UI layout, only rendering. The UI Layout is discussed in UI Layout and details are in VCL UI Rework.

Roadmap for Canvas in Mac OS X

Short term: use the VCL implementation of XCanvas.

Long term: create a native implementation of XCanvas. There are two alternative ways to complete this:

  1. Create complete, non-VCL, canvas implementation in OOo (like the Windows implementation, not worked on in Mac OS X)
  2. Create implementation based on Cairo -library (like the Linux implementation, this is the currently chosen alternative for Mac OS X)

The benefits of cairo-based implementation include:

  • Less code in OOo, more shared code with other open source programs
  • Cairo has been already ported to Mac OS X, no need to duplicate that effort for OOo only.
  • Mozilla is using this approach (in Gecko 1.9 / Firefox 3.0) for all of their platforms (The Thebes API, which is a light C++ API on top of Cairo API in C)
  • GTK/Gnome is using this approach for all of their platforms (The new Canvas-widget & rendering, based on Cairo)

Status

As of Apr 2008, the Quartz cairo canvas for OOo Mac OS X is implemented, but not fully working. All the text is not visible, although actual rendering works ok. There's also a crash when closing down Canvas.

DONE:

  • Cairo canvas code documentation added
  • Quartz backend added to Cairo Canvas (issue 69066)


Tasks

TODO:

  • Create cross-platform cairo-based text rendering for cairo canvas backend (issue 690xx)


Links


The APIs that are involved are (XCanvas, Cairo, Quartz 2D, and a little bit of Cocoa)

Personal tools