servo: solid_color -> display_item_solid_color (preparation for display_item_image)
authorPatrick Walton <pcwalton@mimiga.net>
Thu, 24 May 2012 19:08:49 -0700
changeset 470746 31cb486a3db28b6e4e8b2879ee8223ebd650901a
parent 470745 afe07e6b28db356c5d94e0a1a4d678ec8b772c64
child 470747 ed5ee43bbd8218d370909981be7ba90472ee0840
push id44079
push userbmo:gps@mozilla.com
push dateSat, 04 Feb 2017 00:14:49 +0000
servo: solid_color -> display_item_solid_color (preparation for display_item_image) Source-Repo: https://github.com/servo/servo Source-Revision: a6fe64d76139e00f39d2b743a0df6c4b26881b4e
servo/src/servo/gfx/renderer.rs
servo/src/servo/layout/display_list.rs
servo/src/servo/layout/layout.rs
--- a/servo/src/servo/gfx/renderer.rs
+++ b/servo/src/servo/gfx/renderer.rs
@@ -49,17 +49,17 @@ fn draw_display_list(
     draw_target: AzDrawTargetRef,
     display_list: dl::display_list
 ) {
     clear(draw_target);
 
     for display_list.each {|item|
         #debug["drawing %?", item];
         let (r, g, b) = alt check item.item_type {
-          dl::solid_color(r, g, b) { (r, g, b) }
+          dl::display_item_solid_color(r, g, b) { (r, g, b) }
         };
         let bounds = (*item).bounds;
 
         let to_float = fn@(u: u8) -> float {
             (u as float) / 255f
         };
 
         let red_color = {
--- a/servo/src/servo/layout/display_list.rs
+++ b/servo/src/servo/layout/display_list.rs
@@ -1,12 +1,12 @@
 import gfx::geom::*;
 
 enum item_type {
-    solid_color(u8, u8, u8),
+    display_item_solid_color(u8, u8, u8),
     // FIXME: Shape code does not understand the alignment without this
     padding(u8, u8, u8, u8)
 }
 
 enum display_item = {
     item_type: item_type,
     bounds: rect<au>
 };
--- a/servo/src/servo/layout/layout.rs
+++ b/servo/src/servo/layout/layout.rs
@@ -58,16 +58,16 @@ fn build_display_list(box: @base::box) -
 
     #debug("display_list: %?", list);
     ret list;
 }
 
 fn box_to_display_item(box: @base::box) -> dl::display_item {
     let r = rand::rng();
     let item = dl::display_item({
-        item_type: dl::solid_color(r.next() as u8,
-                                   r.next() as u8,
-                                   r.next() as u8),
+        item_type: dl::display_item_solid_color(r.next() as u8,
+                                                r.next() as u8,
+                                                r.next() as u8),
         bounds: box.bounds
     });
     #debug("layout: display item: %?", item);
     ret item;
 }