Platform/GFX/Moz2D: Difference between revisions

Updated Skia section (build docs changed so build type for Moz2D unclear)
No edit summary
(Updated Skia section (build docs changed so build type for Moz2D unclear))
 
(3 intermediate revisions by 2 users not shown)
Line 63: Line 63:
** Draw it, or just part of it (DrawSurface)
** Draw it, or just part of it (DrawSurface)
** Use it as a mask when drawing a pattern (MaskSurface)
** Use it as a mask when drawing a pattern (MaskSurface)
** Use it as a pattern will filling a rectangle (FillRect after wrapping the SourceSurface in a SourcePattern)
** Use it as a pattern when filling a rectangle (FillRect after wrapping the SourceSurface in a SourcePattern)
* You can also get a DataSourceSurface from it which ''does'' let you access its data.
* You can also get a DataSourceSurface from it which ''does'' let you access its data.


Line 163: Line 163:
# On OSX clang++ is required: CXX=clang++
# On OSX clang++ is required: CXX=clang++
# Build using one of the following targets:
# Build using one of the following targets:
#* release: <code>make -f Makefile.standalone release MOZ2D_CAIRO=true</code>
#* release: <code>make release</code>
#* debug: <code>make -f Makefile.standalone debug MOZ2D_CAIRO=true</code>
#* debug: <code>make debug</code>
#* check: <code>make -f Makefile.standalone check MOZ2D_CAIRO=true</code>
#* check: <code>make check</code>
#* player2d: <code>make -f Makefile.standalone player2d MOZ2D_CAIRO=true</code>
#* player2d: <code>make player2d</code>


When building Player2D beware of the following:
When building Player2D beware of the following:
Line 178: Line 178:


* Skia:
* Skia:
** <code>svn checkout http://skia.googlecode.com/svn/trunk skia</code>
** Use a non-debug build. For download and build instructions see https://skia.org/user/download
** Build skia with <code>BUILDTYPE=Release</code>. See https://sites.google.com/site/skiadocs/user-documentation/quick-start-guides/linux
* If you plan on using Player2D, qt4-sdk (http://qt-project.org/downloads)
* If you plan on using Player2D, qt4-sdk (http://qt-project.org/downloads)


Line 185: Line 184:


# Clone the repository: <code>hg clone http://hg.mozilla.org/users/bschouten_mozilla.com/moz2d</code>
# Clone the repository: <code>hg clone http://hg.mozilla.org/users/bschouten_mozilla.com/moz2d</code>
# <code>make -f Makefile.standalone clean release MOZ2D_SKIA=skia</code>
# <code>make clean release MOZ2D_SKIA=true</code>
# If you didn't checkout skia under the moz2d src directory then set MOZ2D_SKIA to it's relative path
# If you didn't checkout skia under the moz2d src directory then set MOZ2D_SKIA to it's relative path