aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'components/gfx')
-rw-r--r--components/gfx/Cargo.toml2
-rw-r--r--components/gfx/buffer_map.rs6
-rw-r--r--components/gfx/lib.rs4
-rw-r--r--components/gfx/paint_context.rs9
-rw-r--r--components/gfx/paint_task.rs2
5 files changed, 12 insertions, 11 deletions
diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml
index 359bc97e841..ee9d4990da9 100644
--- a/components/gfx/Cargo.toml
+++ b/components/gfx/Cargo.toml
@@ -67,5 +67,5 @@ path = "../script_traits"
url = "0.2.16"
time = "0.1.12"
bitflags = "*"
-rustc-serialize = "0.2"
+rustc-serialize = "0.3"
libc = "*"
diff --git a/components/gfx/buffer_map.rs b/components/gfx/buffer_map.rs
index c33617a7c9e..c16ae23eb13 100644
--- a/components/gfx/buffer_map.rs
+++ b/components/gfx/buffer_map.rs
@@ -7,7 +7,7 @@ use std::collections::hash_map::Entry::{Occupied, Vacant};
use geom::size::Size2D;
use layers::platform::surface::NativePaintingGraphicsContext;
use layers::layers::LayerBuffer;
-use std::hash::{Hash, Hasher, Writer};
+use std::hash::{Hash, Hasher};
use std::mem;
/// This is a struct used to store buffers when they are not in use.
@@ -29,8 +29,8 @@ pub struct BufferMap {
#[derive(Eq, Copy)]
struct BufferKey([uint; 2]);
-impl<H: Hasher+Writer> Hash<H> for BufferKey {
- fn hash(&self, state: &mut H) {
+impl Hash for BufferKey {
+ fn hash<H: Hasher>(&self, state: &mut H) {
let BufferKey(ref bytes) = *self;
bytes.as_slice().hash(state);
}
diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs
index 808f2027213..3fe671fc888 100644
--- a/components/gfx/lib.rs
+++ b/components/gfx/lib.rs
@@ -16,7 +16,7 @@
#![feature(unicode)]
#![feature(unsafe_destructor)]
-#![allow(missing_copy_implementations)]
+#![plugin(plugins)]
#[macro_use]
extern crate log;
@@ -32,8 +32,6 @@ extern crate png;
extern crate script_traits;
extern crate "rustc-serialize" as rustc_serialize;
extern crate unicode;
-#[no_link] #[plugin]
-extern crate "plugins" as servo_plugins;
extern crate net;
#[macro_use]
extern crate util;
diff --git a/components/gfx/paint_context.rs b/components/gfx/paint_context.rs
index 442e13f7333..88c031a165f 100644
--- a/components/gfx/paint_context.rs
+++ b/components/gfx/paint_context.rs
@@ -850,9 +850,11 @@ impl<'a> PaintContext<'a> {
// Draw the text.
let temporary_draw_target =
self.create_draw_target_for_blur_if_necessary(&text.base.bounds, text.blur_radius);
- self.font_context
- .get_paint_font_from_template(&text.text_run.font_template,
- text.text_run.actual_pt_size)
+ {
+ // FIXME(https://github.com/rust-lang/rust/issues/23338)
+ let font = self.font_context.get_paint_font_from_template(
+ &text.text_run.font_template, text.text_run.actual_pt_size);
+ font
.borrow()
.draw_text(&temporary_draw_target.draw_target,
&*text.text_run,
@@ -860,6 +862,7 @@ impl<'a> PaintContext<'a> {
baseline_origin,
text.text_color,
opts::get().enable_text_antialiasing);
+ }
// Blur, if necessary.
self.blur_if_necessary(temporary_draw_target, text.blur_radius);
diff --git a/components/gfx/paint_task.rs b/components/gfx/paint_task.rs
index 731842d3f89..b21e861a8f8 100644
--- a/components/gfx/paint_task.rs
+++ b/components/gfx/paint_task.rs
@@ -134,7 +134,7 @@ macro_rules! native_graphics_context(
)
);
-impl<C> PaintTask<C> where C: PaintListener + Send {
+impl<C> PaintTask<C> where C: PaintListener + Send + 'static {
pub fn create(id: PipelineId,
port: Receiver<Msg>,
compositor: C,