From 797eb6a676889331b4ca5e588e6deee61bfb6e93 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 21 Oct 2014 19:54:37 -0600 Subject: [PATCH] servo: Merge #3749 - gfx: Update rust-azure to pick up arcs, gradients, and subpixel text (from pcwalton:update-rust-azure); r=metajack r? @metajack Source-Repo: https://github.com/servo/servo Source-Revision: 691e42f7ef9005b2466bff85eee21e0363c77050 --- servo/Cargo.lock | 10 +++++----- servo/components/canvas/canvas_render_task.rs | 4 ++-- servo/components/gfx/render_context.rs | 10 ++++++---- servo/ports/android/glut_app/Cargo.lock | 10 +++++----- servo/ports/cef/Cargo.lock | 12 ++++++------ 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/servo/Cargo.lock b/servo/Cargo.lock index 06b4d0085d55..8b762bf0869c 100644 --- a/servo/Cargo.lock +++ b/servo/Cargo.lock @@ -25,7 +25,7 @@ dependencies = [ [[package]] name = "azure" version = "0.1.0" -source = "git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d" +source = "git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471" dependencies = [ "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)", @@ -44,7 +44,7 @@ dependencies = [ name = "canvas" version = "0.0.1" dependencies = [ - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#b001a76e907befaae1d0d6dd259418a22092da86)", ] @@ -58,7 +58,7 @@ name = "compositing" version = "0.0.1" dependencies = [ "alert 0.1.0 (git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e)", - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)", "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#967a97fa7e9ae47f96aee5e48f5fb0be1345d89e)", "devtools 0.0.1", @@ -172,7 +172,7 @@ source = "git+https://github.com/servo/rust-geom#b001a76e907befaae1d0d6dd259418a name = "gfx" version = "0.0.1" dependencies = [ - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)", "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#967a97fa7e9ae47f96aee5e48f5fb0be1345d89e)", @@ -324,7 +324,7 @@ source = "git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7 name = "msg" version = "0.0.1" dependencies = [ - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#b001a76e907befaae1d0d6dd259418a22092da86)", "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#5e9b063b36028a5b40a417c661ee5c628b594be9)", diff --git a/servo/components/canvas/canvas_render_task.rs b/servo/components/canvas/canvas_render_task.rs index 7eafd1aef090..8dacd11cdccb 100644 --- a/servo/components/canvas/canvas_render_task.rs +++ b/servo/components/canvas/canvas_render_task.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use azure::azure_hl::{DrawTarget, Color, B8G8R8A8, SkiaBackend, StrokeOptions, DrawOptions}; -use azure::azure_hl::ColorPattern; +use azure::azure_hl::{ColorPattern, ColorPatternRef}; use geom::rect::Rect; use geom::size::Size2D; @@ -56,7 +56,7 @@ impl CanvasRenderTask { fn fill_rect(&self, rect: &Rect) { let drawopts = DrawOptions::new(1.0, 0); - self.drawtarget.fill_rect(rect, &self.fill_color, Some(&drawopts)); + self.drawtarget.fill_rect(rect, ColorPatternRef(&self.fill_color), Some(&drawopts)); } fn clear_rect(&self, rect: &Rect) { diff --git a/servo/components/gfx/render_context.rs b/servo/components/gfx/render_context.rs index 252a0051f402..e2c893890c1d 100644 --- a/servo/components/gfx/render_context.rs +++ b/servo/components/gfx/render_context.rs @@ -5,8 +5,8 @@ use font_context::FontContext; use style::computed_values::border_style; -use azure::azure_hl::{B8G8R8A8, A8, Color, ColorPattern, DrawOptions, DrawSurfaceOptions, DrawTarget}; -use azure::azure_hl::{Linear, SourceOp, StrokeOptions}; +use azure::azure_hl::{B8G8R8A8, A8, Color, ColorPattern, ColorPatternRef, DrawOptions}; +use azure::azure_hl::{DrawSurfaceOptions, DrawTarget, Linear, SourceOp, StrokeOptions}; use azure::AZ_CAP_BUTT; use azure::AzFloat; use geom::point::Point2D; @@ -48,7 +48,9 @@ impl<'a> RenderContext<'a> { pub fn draw_solid_color(&self, bounds: &Rect, color: Color) { self.draw_target.make_current(); - self.draw_target.fill_rect(&bounds.to_azure_rect(), &ColorPattern::new(color), None); + self.draw_target.fill_rect(&bounds.to_azure_rect(), + ColorPatternRef(&ColorPattern::new(color)), + None); } pub fn draw_border(&self, @@ -133,7 +135,7 @@ impl<'a> RenderContext<'a> { let mut draw_options = DrawOptions::new(1.0, 0); draw_options.set_composition_op(SourceOp); self.draw_target.make_current(); - self.draw_target.fill_rect(&rect, &pattern, Some(&draw_options)); + self.draw_target.fill_rect(&rect, ColorPatternRef(&pattern), Some(&draw_options)); } fn draw_border_segment(&self, direction: Direction, bounds: &Rect, border: SideOffsets2D, color: SideOffsets2D, style: SideOffsets2D) { diff --git a/servo/ports/android/glut_app/Cargo.lock b/servo/ports/android/glut_app/Cargo.lock index ad9b312128af..fcd867589f41 100644 --- a/servo/ports/android/glut_app/Cargo.lock +++ b/servo/ports/android/glut_app/Cargo.lock @@ -24,7 +24,7 @@ dependencies = [ [[package]] name = "azure" version = "0.1.0" -source = "git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d" +source = "git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471" dependencies = [ "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)", @@ -43,7 +43,7 @@ dependencies = [ name = "canvas" version = "0.0.1" dependencies = [ - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#90add8d65273c8a46aa16d73959e29a51d0c282d)", ] @@ -57,7 +57,7 @@ name = "compositing" version = "0.0.1" dependencies = [ "alert 0.1.0 (git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e)", - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)", "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#967a97fa7e9ae47f96aee5e48f5fb0be1345d89e)", "devtools 0.0.1", @@ -171,7 +171,7 @@ source = "git+https://github.com/servo/rust-geom#90add8d65273c8a46aa16d73959e29a name = "gfx" version = "0.0.1" dependencies = [ - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)", "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#967a97fa7e9ae47f96aee5e48f5fb0be1345d89e)", @@ -318,7 +318,7 @@ source = "git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7 name = "msg" version = "0.0.1" dependencies = [ - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#90add8d65273c8a46aa16d73959e29a51d0c282d)", "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#5e9b063b36028a5b40a417c661ee5c628b594be9)", diff --git a/servo/ports/cef/Cargo.lock b/servo/ports/cef/Cargo.lock index 7a17c954194a..8afebfabd507 100644 --- a/servo/ports/cef/Cargo.lock +++ b/servo/ports/cef/Cargo.lock @@ -2,7 +2,7 @@ name = "embedding" version = "0.0.1" dependencies = [ - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)", "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#967a97fa7e9ae47f96aee5e48f5fb0be1345d89e)", "devtools 0.0.1", @@ -36,7 +36,7 @@ dependencies = [ [[package]] name = "azure" version = "0.1.0" -source = "git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d" +source = "git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471" dependencies = [ "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)", @@ -55,7 +55,7 @@ dependencies = [ name = "canvas" version = "0.0.1" dependencies = [ - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#b001a76e907befaae1d0d6dd259418a22092da86)", ] @@ -69,7 +69,7 @@ name = "compositing" version = "0.0.1" dependencies = [ "alert 0.1.0 (git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e)", - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)", "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#967a97fa7e9ae47f96aee5e48f5fb0be1345d89e)", "devtools 0.0.1", @@ -183,7 +183,7 @@ source = "git+https://github.com/servo/rust-geom#b001a76e907befaae1d0d6dd259418a name = "gfx" version = "0.0.1" dependencies = [ - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)", "core_graphics 0.1.0 (git+https://github.com/servo/rust-core-graphics#6a9919f8a912cc67571b891ba198d5325964a104)", "core_text 0.1.0 (git+https://github.com/servo/rust-core-text#967a97fa7e9ae47f96aee5e48f5fb0be1345d89e)", @@ -335,7 +335,7 @@ source = "git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7 name = "msg" version = "0.0.1" dependencies = [ - "azure 0.1.0 (git+https://github.com/servo/rust-azure#b357751c04a89a87e6ef1f0cebe5f20957dd112d)", + "azure 0.1.0 (git+https://github.com/servo/rust-azure#e151fa23f5cb3c1ef62b4d41bad9abdd1f4f3471)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#b001a76e907befaae1d0d6dd259418a22092da86)", "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#5e9b063b36028a5b40a417c661ee5c628b594be9)",