diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index 36db9e1d16a..4f9395a68a4 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -56,9 +56,13 @@ git = "https://github.com/servo/rust-core-graphics" [dependencies.core_text] git = "https://github.com/servo/rust-core-text" +[dependencies.skia] +git = "https://github.com/servo/skia" +branch = "upstream-2014-06-16" + [dependencies.script_traits] path = "../script_traits" [dependencies] url = "0.2.16" -time = "0.1.12" \ No newline at end of file +time = "0.1.12" diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index 6557b4bed2d..4fd3792413c 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -29,6 +29,7 @@ extern crate "net" as servo_net; extern crate util; extern crate "msg" as servo_msg; extern crate style; +extern crate skia; extern crate time; extern crate url; diff --git a/components/gfx/paint_task.rs b/components/gfx/paint_task.rs index 3a8243af100..33d73801cbf 100644 --- a/components/gfx/paint_task.rs +++ b/components/gfx/paint_task.rs @@ -10,8 +10,8 @@ use font_cache_task::FontCacheTask; use font_context::FontContext; use paint_context::PaintContext; -use azure::azure_hl::{SurfaceFormat, Color, DrawTarget, BackendType, StolenGLResources}; -use azure::{AzFloat, AzGLNativeContextRef}; +use azure::azure_hl::{SurfaceFormat, Color, DrawTarget, BackendType}; +use azure::AzFloat; use geom::matrix2d::Matrix2D; use geom::point::Point2D; use geom::rect::Rect; @@ -25,6 +25,7 @@ use servo_msg::compositor_msg::{LayerMetadata, PaintListener, ScrollPolicy}; use servo_msg::constellation_msg::Msg as ConstellationMsg; use servo_msg::constellation_msg::{ConstellationChan, Failure, PipelineId}; use servo_msg::constellation_msg::PipelineExitType; +use skia::SkiaGrGLNativeContextRef; use util::geometry::{Au, ZERO_POINT}; use util::opts; use util::smallvec::SmallVec; @@ -518,7 +519,7 @@ impl WorkerThread { // FIXME(pcwalton): Cache the components of draw targets (texture color buffer, // paintbuffers) instead of recreating them. let native_graphics_context = - native_graphics_context!(self) as *const _ as AzGLNativeContextRef; + native_graphics_context!(self) as *const _ as SkiaGrGLNativeContextRef; let draw_target = DrawTarget::new_with_fbo(BackendType::Skia, native_graphics_context, size, @@ -591,13 +592,11 @@ impl WorkerThread { // GPU painting path: draw_target.make_current(); - let StolenGLResources { - surface: azure_surface - } = draw_target.steal_gl_resources().unwrap(); // We mark the native surface as not leaking in case the surfaces // die on their way to the compositor task. - let mut native_surface: NativeSurface = NativeSurface::from_azure_surface(azure_surface); + let mut native_surface: NativeSurface = + NativeSurface::from_draw_target_backing(draw_target.steal_draw_target_backing()); native_surface.mark_wont_leak(); box LayerBuffer { diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 89d9c71a815..819286c9e37 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -35,7 +35,7 @@ dependencies = [ [[package]] name = "azure" version = "0.1.0" -source = "git+https://github.com/servo/rust-azure#72deb42903b12dc6f1924fa1757cd79d37b35429" +source = "git+https://github.com/servo/rust-azure#779233af589e797f07e9e2f3f45017fb55c33c68" dependencies = [ "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics)", @@ -43,7 +43,7 @@ dependencies = [ "egl 0.1.0 (git+https://github.com/servo/rust-egl)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "geom 0.1.0 (git+https://github.com/servo/rust-geom)", - "skia-sys 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", + "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)", ] @@ -283,6 +283,7 @@ dependencies = [ "plugins 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png)", "script_traits 0.0.1", + "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)", "style 0.0.1", "time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -443,7 +444,7 @@ source = "git+https://github.com/bjz/gl-rs.git#230e6c9ed611cddfcb6682dee9686471d [[package]] name = "layers" version = "0.1.0" -source = "git+https://github.com/servo/rust-layers#c17875c1951ffe2425733a596c2e6c10d9276720" +source = "git+https://github.com/servo/rust-layers#253fd0eb7e49b356393e14abdf34c76152cba10f" dependencies = [ "azure 0.1.0 (git+https://github.com/servo/rust-azure)", "cgl 0.0.1 (git+https://github.com/servo/rust-cgl)", @@ -453,6 +454,7 @@ dependencies = [ "gleam 0.0.1 (git+https://github.com/servo/gleam)", "glx 0.0.1 (git+https://github.com/servo/rust-glx)", "io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface)", + "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)", ] @@ -681,9 +683,9 @@ dependencies = [ ] [[package]] -name = "skia-sys" +name = "skia" version = "0.0.20130412" -source = "git+https://github.com/servo/skia?branch=upstream-2014-06-16#aeb720b947ec463f780a0d00ab8485f902a83986" +source = "git+https://github.com/servo/skia?branch=upstream-2014-06-16#387777643df6df6ce8fb61ce069c7c60b32ab38c" dependencies = [ "expat-sys 2.1.0 (git+https://github.com/servo/libexpat)", "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)", diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 0ee176b8029..fca6588c306 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -34,7 +34,7 @@ dependencies = [ [[package]] name = "azure" version = "0.1.0" -source = "git+https://github.com/servo/rust-azure#72deb42903b12dc6f1924fa1757cd79d37b35429" +source = "git+https://github.com/servo/rust-azure#779233af589e797f07e9e2f3f45017fb55c33c68" dependencies = [ "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics)", @@ -42,7 +42,7 @@ dependencies = [ "egl 0.1.0 (git+https://github.com/servo/rust-egl)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "geom 0.1.0 (git+https://github.com/servo/rust-geom)", - "skia-sys 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", + "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)", ] @@ -282,6 +282,7 @@ dependencies = [ "plugins 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png)", "script_traits 0.0.1", + "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)", "style 0.0.1", "time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -442,7 +443,7 @@ source = "git+https://github.com/bjz/gl-rs.git#230e6c9ed611cddfcb6682dee9686471d [[package]] name = "layers" version = "0.1.0" -source = "git+https://github.com/servo/rust-layers#c17875c1951ffe2425733a596c2e6c10d9276720" +source = "git+https://github.com/servo/rust-layers#253fd0eb7e49b356393e14abdf34c76152cba10f" dependencies = [ "azure 0.1.0 (git+https://github.com/servo/rust-azure)", "cgl 0.0.1 (git+https://github.com/servo/rust-cgl)", @@ -452,6 +453,7 @@ dependencies = [ "gleam 0.0.1 (git+https://github.com/servo/gleam)", "glx 0.0.1 (git+https://github.com/servo/rust-glx)", "io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface)", + "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)", ] @@ -698,9 +700,9 @@ dependencies = [ ] [[package]] -name = "skia-sys" +name = "skia" version = "0.0.20130412" -source = "git+https://github.com/servo/skia?branch=upstream-2014-06-16#aeb720b947ec463f780a0d00ab8485f902a83986" +source = "git+https://github.com/servo/skia?branch=upstream-2014-06-16#387777643df6df6ce8fb61ce069c7c60b32ab38c" dependencies = [ "expat-sys 2.1.0 (git+https://github.com/servo/libexpat)", "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)", diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 32cd29c0721..a3581dd23f0 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -15,7 +15,7 @@ dependencies = [ [[package]] name = "azure" version = "0.1.0" -source = "git+https://github.com/servo/rust-azure#72deb42903b12dc6f1924fa1757cd79d37b35429" +source = "git+https://github.com/servo/rust-azure#779233af589e797f07e9e2f3f45017fb55c33c68" dependencies = [ "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics)", @@ -23,7 +23,7 @@ dependencies = [ "egl 0.1.0 (git+https://github.com/servo/rust-egl)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "geom 0.1.0 (git+https://github.com/servo/rust-geom)", - "skia-sys 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", + "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)", ] @@ -253,6 +253,7 @@ dependencies = [ "plugins 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png)", "script_traits 0.0.1", + "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)", "style 0.0.1", "time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -361,7 +362,7 @@ source = "git+https://github.com/bjz/gl-rs.git#230e6c9ed611cddfcb6682dee9686471d [[package]] name = "layers" version = "0.1.0" -source = "git+https://github.com/servo/rust-layers#c17875c1951ffe2425733a596c2e6c10d9276720" +source = "git+https://github.com/servo/rust-layers#253fd0eb7e49b356393e14abdf34c76152cba10f" dependencies = [ "azure 0.1.0 (git+https://github.com/servo/rust-azure)", "cgl 0.0.1 (git+https://github.com/servo/rust-cgl)", @@ -371,6 +372,7 @@ dependencies = [ "gleam 0.0.1 (git+https://github.com/servo/gleam)", "glx 0.0.1 (git+https://github.com/servo/rust-glx)", "io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface)", + "skia 0.0.20130412 (git+https://github.com/servo/skia?branch=upstream-2014-06-16)", "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)", ] @@ -616,9 +618,9 @@ dependencies = [ ] [[package]] -name = "skia-sys" +name = "skia" version = "0.0.20130412" -source = "git+https://github.com/servo/skia?branch=upstream-2014-06-16#aeb720b947ec463f780a0d00ab8485f902a83986" +source = "git+https://github.com/servo/skia?branch=upstream-2014-06-16#387777643df6df6ce8fb61ce069c7c60b32ab38c" dependencies = [ "expat-sys 2.1.0 (git+https://github.com/servo/libexpat)", "freetype-sys 2.4.11 (git+https://github.com/servo/libfreetype2)",