Split out xlib to rust-xlib and cairo to rust-cairo.

This commit is contained in:
Brian J. Burg 2012-10-25 14:56:07 -07:00
parent e01d97460b
commit 5c68d158f0
14 changed files with 41 additions and 28 deletions

6
.gitmodules vendored
View file

@ -73,3 +73,9 @@
[submodule "src/rust-fontconfig"] [submodule "src/rust-fontconfig"]
path = src/rust-fontconfig path = src/rust-fontconfig
url = git://github.com/mozilla-servo/rust-fontconfig.git url = git://github.com/mozilla-servo/rust-fontconfig.git
[submodule "src/rust-xlib"]
path = src/rust-xlib
url = git://github.com/mozilla-servo/rust-xlib.git
[submodule "src/rust-cairo"]
path = src/rust-cairo
url = git://github.com/mozilla-servo/rust-cairo.git

4
configure vendored
View file

@ -344,7 +344,7 @@ step_msg "running submodule autoconf scripts"
(cd ${CFG_SRC_DIR}src/mozjs/js/src && "${CFG_AUTOCONF213}") || exit $? (cd ${CFG_SRC_DIR}src/mozjs/js/src && "${CFG_AUTOCONF213}") || exit $?
CFG_SUBMODULES="libwapcaplet rust-wapcaplet rust-harfbuzz rust-opengles rust-azure rust-stb-image rust-geom rust-glut rust-layers rust-http-client libparserutils libhubbub libcss rust-netsurfcss rust-hubbub sharegl rust-mozjs mozjs" CFG_SUBMODULES="libwapcaplet rust-wapcaplet rust-harfbuzz rust-opengles rust-azure rust-cairo rust-stb-image rust-geom rust-glut rust-layers rust-http-client libparserutils libhubbub libcss rust-netsurfcss rust-hubbub sharegl rust-mozjs mozjs"
if [ $CFG_OSTYPE = "darwin" ] if [ $CFG_OSTYPE = "darwin" ]
then then
@ -353,7 +353,7 @@ fi
if [ $CFG_OSTYPE = "linux" ] if [ $CFG_OSTYPE = "linux" ]
then then
CFG_SUBMODULES="rust-freetype rust-fontconfig ${CFG_SUBMODULES}" CFG_SUBMODULES="rust-freetype rust-fontconfig rust-xlib ${CFG_SUBMODULES}"
fi fi
step_msg "making build directories" step_msg "making build directories"

View file

@ -5,16 +5,19 @@
# NB. This should not be a problem once a real package system exists. # NB. This should not be a problem once a real package system exists.
DEPS_rust-azure += \ DEPS_rust-azure += \
rust-geom rust-geom \
rust-cairo
DEPS_rust-glut += \ DEPS_rust-glut += \
rust-opengles rust-opengles
DEPS_rust-layers += \ DEPS_rust-layers += \
rust-azure \ rust-azure \
rust-cairo \
rust-geom \ rust-geom \
rust-glut \ rust-glut \
rust-opengles rust-opengles \
$(NULL)
DEPS_sharegl += \ DEPS_sharegl += \
rust-geom \ rust-geom \
@ -43,8 +46,8 @@ CFLAGS_rust-mozjs += \
"-I../mozjs/dist/include" "-I../mozjs/dist/include"
DEPS_libcss += \ DEPS_libcss += \
libwapcaplet \ libwapcaplet \
libparserutils libparserutils
# Platform-specific dependencies # Platform-specific dependencies
ifeq ($(CFG_OSTYPE),darwin) ifeq ($(CFG_OSTYPE),darwin)
@ -52,7 +55,7 @@ DEPS_rust-azure += \
rust-core-graphics \ rust-core-graphics \
rust-core-foundation rust-core-foundation
DEPS_rust-layers += \ DEPS_rust-cairo += \
rust-core-graphics rust-core-graphics
DEPS_rust-io-surface += \ DEPS_rust-io-surface += \
@ -68,6 +71,10 @@ DEPS_rust-core-text += \
endif endif
ifeq ($(CFG_OSTYPE),linux) ifeq ($(CFG_OSTYPE),linux)
DEPS_rust-cairo += \
rust-xlib
DEPS_rust-azure += \ DEPS_rust-azure += \
rust-freetype \ rust-freetype \
rust-fontconfig rust-fontconfig

@ -1 +1 @@
Subproject commit 8ba49fef417cb1b4da053d762dd3a683b9239c85 Subproject commit 6361edcf43a0d791907b852ffd0cb55791d0c6a3

1
src/rust-cairo Submodule

@ -0,0 +1 @@
Subproject commit 84214a4b9e4e29403a8a744d4463ad9239294937

@ -1 +1 @@
Subproject commit ad15d6ac9c632018da7765b4a6f2037a224f4383 Subproject commit 827c3e99e6995aac6bffe030acf56c96fc543da4

1
src/rust-xlib Submodule

@ -0,0 +1 @@
Subproject commit 564266ba219295b38af6ed1fd869a9093a991f6f

View file

@ -1,6 +1,6 @@
use dom::event::Event;
use azure::cairo_hl::ImageSurface;
use azure::azure_hl::{DrawTarget}; use azure::azure_hl::{DrawTarget};
use cairo::cairo_hl::ImageSurface;
use dom::event::Event;
use geom::size::Size2D; use geom::size::Size2D;
struct LayerBuffer { struct LayerBuffer {

View file

@ -8,9 +8,8 @@ Each time the renderer renders a frame the compositor will output a
use libc::{c_int, c_uint, c_void, c_uchar}; use libc::{c_int, c_uint, c_void, c_uchar};
use azure_bg = azure::bindgen; use azure_bg = azure::bindgen;
use azure_bg::{AzCreateDrawTargetForCairoSurface, AzReleaseDrawTarget}; use azure_bg::{AzCreateDrawTargetForCairoSurface, AzReleaseDrawTarget};
use azure::cairo;
use azure::azure_hl::DrawTarget; use azure::azure_hl::DrawTarget;
use azure::cairo_hl::ImageSurface; use cairo::cairo_hl::ImageSurface;
use cairo::{CAIRO_FORMAT_ARGB32, cairo_surface_t, cairo_status_t, CAIRO_STATUS_SUCCESS}; use cairo::{CAIRO_FORMAT_ARGB32, cairo_surface_t, cairo_status_t, CAIRO_STATUS_SUCCESS};
use cairo_bg = cairo::bindgen; use cairo_bg = cairo::bindgen;
use cairo_bg::{cairo_image_surface_create, cairo_surface_destroy, use cairo_bg::{cairo_image_surface_create, cairo_surface_destroy,

View file

@ -8,6 +8,7 @@ use image::base::Image;
use au::Au; use au::Au;
use util::range::Range; use util::range::Range;
use cairo::cairo_hl::ImageSurface;
use core::libc::types::common::c99::uint16_t; use core::libc::types::common::c99::uint16_t;
use core::ptr::to_unsafe_ptr; use core::ptr::to_unsafe_ptr;
use core::dvec::DVec; use core::dvec::DVec;
@ -15,7 +16,6 @@ use std::arc::ARC;
use geom::size::Size2D; use geom::size::Size2D;
use geom::point::Point2D; use geom::point::Point2D;
use geom::rect::Rect; use geom::rect::Rect;
use azure::cairo_hl::ImageSurface;
use azure::{AzDrawOptions, AzFloat}; use azure::{AzDrawOptions, AzFloat};
use azure::azure_hl::{AsAzureRect, B8G8R8A8, Color, ColorPattern, DrawOptions, DrawSurfaceOptions, StrokeOptions}; use azure::azure_hl::{AsAzureRect, B8G8R8A8, Color, ColorPattern, DrawOptions, DrawSurfaceOptions, StrokeOptions};
use azure::azure_hl::{DrawTarget, Linear}; use azure::azure_hl::{DrawTarget, Linear};

View file

@ -2,8 +2,8 @@ use gfx::display_list::DisplayList;
use gfx::compositor::LayerBuffer; use gfx::compositor::LayerBuffer;
use azure::azure_hl::DrawTarget; use azure::azure_hl::DrawTarget;
use azure::cairo::CAIRO_FORMAT_RGB24; use cairo::CAIRO_FORMAT_RGB24;
use azure::cairo_hl::ImageSurface; use cairo::cairo_hl::ImageSurface;
use core::libc::c_int; use core::libc::c_int;
use geom::size::Size2D; use geom::size::Size2D;

View file

@ -1,9 +1,8 @@
use mod azure::azure_hl; use mod azure::azure_hl;
use azure::azure_hl::DrawTarget; use azure::azure_hl::DrawTarget;
use azure::cairo; use cairo::cairo_surface_t;
use azure::cairo_hl::ImageSurface; use cairo::cairo_hl::ImageSurface;
use dvec::DVec; use dvec::DVec;
use azure::cairo::cairo_surface_t;
use gfx::compositor::{LayerBuffer, Compositor}; use gfx::compositor::{LayerBuffer, Compositor};
use dom::event::{Event, ResizeEvent}; use dom::event::{Event, ResizeEvent};
use layers::ImageLayer; use layers::ImageLayer;

View file

@ -7,18 +7,19 @@
#[license = "MPL"]; #[license = "MPL"];
#[crate_type = "lib"]; #[crate_type = "lib"];
extern mod std;
extern mod azure; extern mod azure;
extern mod js; extern mod cairo;
extern mod stb_image;
extern mod geom; extern mod geom;
extern mod glut; extern mod glut;
extern mod layers;
extern mod opengles;
extern mod http_client; extern mod http_client;
extern mod hubbub; extern mod hubbub;
extern mod sharegl; extern mod js;
extern mod layers;
extern mod netsurfcss; extern mod netsurfcss;
extern mod opengles;
extern mod sharegl;
extern mod stb_image;
extern mod std;
pub mod engine; pub mod engine;

View file

@ -82,7 +82,6 @@ impl Font {
AZ_NATIVE_FONT_CAIRO_FONT_FACE AZ_NATIVE_FONT_CAIRO_FONT_FACE
}; };
use azure::bindgen::AzCreateScaledFontWithCairo; use azure::bindgen::AzCreateScaledFontWithCairo;
use azure::cairo;
use cairo::{cairo_font_face_t, cairo_scaled_font_t}; use cairo::{cairo_font_face_t, cairo_scaled_font_t};
use cairo::bindgen::cairo_scaled_font_destroy; use cairo::bindgen::cairo_scaled_font_destroy;
@ -110,7 +109,7 @@ impl Font {
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
fn get_cairo_face(font: &Font) -> *cairo_font_face_t { fn get_cairo_face(font: &Font) -> *cairo_font_face_t {
use azure::cairo_ft::bindgen::{cairo_ft_font_face_create_for_ft_face}; use cairo::cairo_ft::bindgen::{cairo_ft_font_face_create_for_ft_face};
let ftface = font.native_font.face; let ftface = font.native_font.face;
let cface = cairo_ft_font_face_create_for_ft_face(ftface, 0 as c_int); let cface = cairo_ft_font_face_create_for_ft_face(ftface, 0 as c_int);
@ -120,7 +119,7 @@ impl Font {
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
fn get_cairo_face(font: &Font) -> *cairo_font_face_t { fn get_cairo_face(font: &Font) -> *cairo_font_face_t {
use azure::cairo_quartz::bindgen::cairo_quartz_font_face_create_for_cgfont; use cairo::cairo_quartz::bindgen::cairo_quartz_font_face_create_for_cgfont;
let cgfont = font.native_font.cgfont; let cgfont = font.native_font.cgfont;
let face = cairo_quartz_font_face_create_for_cgfont(cgfont); let face = cairo_quartz_font_face_create_for_cgfont(cgfont);