mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #9532 - nox:dedup-heapsize, r=Manishearth
Say farewell to in-tree HeapSizeOf <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9532) <!-- Reviewable:end -->
This commit is contained in:
commit
2a6707ce58
82 changed files with 426 additions and 881 deletions
|
@ -14,6 +14,8 @@ bitflags = "0.3"
|
|||
euclid = {version = "0.6.1", features = ["plugins"]}
|
||||
fnv = "1.0"
|
||||
harfbuzz-sys = "0.1"
|
||||
heapsize = "0.2.5"
|
||||
heapsize_plugin = "0.1.2"
|
||||
lazy_static = "0.1"
|
||||
libc = "0.2"
|
||||
log = "0.3"
|
||||
|
@ -23,10 +25,10 @@ rustc-serialize = "0.3"
|
|||
serde = "0.6"
|
||||
serde_macros = "0.6"
|
||||
smallvec = "0.1"
|
||||
string_cache = "0.2"
|
||||
string_cache = {version = "0.2.7", features = ["heap_size"]}
|
||||
time = "0.1.12"
|
||||
unicode-script = { version = "0.1", features = ["harfbuzz"] }
|
||||
url = "0.5.4"
|
||||
url = {version = "0.5.4", features = ["heap_size"]}
|
||||
servo-skia = "0.20130412.0"
|
||||
|
||||
[dependencies.plugins]
|
||||
|
|
|
@ -22,6 +22,7 @@ use euclid::approxeq::ApproxEq;
|
|||
use euclid::num::Zero;
|
||||
use euclid::{Matrix2D, Matrix4, Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use gfx_traits::{color, LayerId, LayerKind, ScrollPolicy};
|
||||
use heapsize::HeapSizeOf;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::image::base::Image;
|
||||
use paint_context::PaintContext;
|
||||
|
@ -41,7 +42,6 @@ use text::glyph::CharIndex;
|
|||
use util::cursor::Cursor;
|
||||
use util::geometry::MAX_RECT;
|
||||
use util::linked_list::prepend_from;
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::opts;
|
||||
use util::print_tree::PrintTree;
|
||||
use util::range::Range;
|
||||
|
@ -1256,8 +1256,8 @@ pub struct GradientDisplayItem {
|
|||
|
||||
impl HeapSizeOf for GradientDisplayItem {
|
||||
fn heap_size_of_children(&self) -> usize {
|
||||
use heapsize::heap_size_of;
|
||||
use libc::c_void;
|
||||
use util::mem::heap_size_of;
|
||||
|
||||
// We can't measure `stops` via Vec's HeapSizeOf implementation because GradientStop isn't
|
||||
// defined in this module, and we don't want to import GradientStop into util::mem where
|
||||
|
|
|
@ -13,6 +13,7 @@ use font::SpecifiedFontStyle;
|
|||
use font::{Font, FontGroup};
|
||||
use font_cache_thread::FontCacheThread;
|
||||
use font_template::FontTemplateDescriptor;
|
||||
use heapsize::HeapSizeOf;
|
||||
use platform::font::FontHandle;
|
||||
use platform::font_context::FontContextHandle;
|
||||
use platform::font_template::FontTemplateData;
|
||||
|
@ -28,7 +29,6 @@ use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
|||
use string_cache::Atom;
|
||||
use style::computed_values::{font_style, font_variant};
|
||||
use util::cache::HashCache;
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))]
|
||||
fn create_scaled_font(template: &Arc<FontTemplateData>, pt_size: Au) -> ScaledFont {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#![feature(str_char)]
|
||||
#![feature(unique)]
|
||||
|
||||
#![plugin(heapsize_plugin)]
|
||||
#![plugin(plugins)]
|
||||
#![plugin(serde_macros)]
|
||||
|
||||
|
@ -45,6 +46,7 @@ extern crate gfx_traits;
|
|||
// shapers. For now, however, this is a hard dependency.
|
||||
extern crate harfbuzz_sys as harfbuzz;
|
||||
|
||||
extern crate heapsize;
|
||||
extern crate ipc_channel;
|
||||
extern crate layers;
|
||||
#[macro_use]
|
||||
|
|
|
@ -10,10 +10,10 @@ use freetype::freetype::FT_Library;
|
|||
use freetype::freetype::FT_Memory;
|
||||
use freetype::freetype::FT_New_Library;
|
||||
use freetype::freetype::struct_FT_MemoryRec_;
|
||||
use heapsize::{HeapSizeOf, heap_size_of};
|
||||
use libc::{c_long, c_void};
|
||||
use std::ptr;
|
||||
use std::rc::Rc;
|
||||
use util::mem::{HeapSizeOf, heap_size_of};
|
||||
|
||||
// We pass a |User| struct -- via an opaque |void*| -- to FreeType each time a new instance is
|
||||
// created. FreeType passes it back to the ft_alloc/ft_realloc/ft_free callbacks. We use it to
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use util::mem::HeapSizeOf;
|
||||
use heapsize::HeapSizeOf;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct FontContextHandle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue