diff --git a/src/components/compositing/compositor.rs b/src/components/compositing/compositor.rs index 5acdcf6bb58..f4025124e8d 100644 --- a/src/components/compositing/compositor.rs +++ b/src/components/compositing/compositor.rs @@ -762,10 +762,10 @@ impl IOCompositor { // Render the scene. match self.scene.root { Some(ref layer) => { - self.scene.background_color.r = layer.extra_data.borrow().unrendered_color.r; - self.scene.background_color.g = layer.extra_data.borrow().unrendered_color.g; - self.scene.background_color.b = layer.extra_data.borrow().unrendered_color.b; - self.scene.background_color.a = layer.extra_data.borrow().unrendered_color.a; + self.scene.background_color.r = layer.extra_data.borrow().background_color.r; + self.scene.background_color.g = layer.extra_data.borrow().background_color.g; + self.scene.background_color.b = layer.extra_data.borrow().background_color.b; + self.scene.background_color.a = layer.extra_data.borrow().background_color.a; rendergl::render_scene(layer.clone(), self.context, &self.scene); } None => {} diff --git a/src/components/compositing/compositor_data.rs b/src/components/compositing/compositor_data.rs index f5fad6a3574..3edc46c3840 100644 --- a/src/components/compositing/compositor_data.rs +++ b/src/components/compositing/compositor_data.rs @@ -38,7 +38,7 @@ pub struct CompositorData { pub scroll_policy: ScrollPolicy, /// The color to use for the unrendered-content void - pub unrendered_color: Color, + pub background_color: Color, /// A monotonically increasing counter that keeps track of the current epoch. /// add_buffer() calls that don't match the current epoch will be ignored. @@ -57,7 +57,7 @@ impl CompositorData { epoch: Epoch, wants_scroll_events: WantsScrollEventsFlag, scroll_policy: ScrollPolicy, - unrendered_color: Color) + background_color: Color) -> CompositorData { CompositorData { pipeline: pipeline, @@ -65,20 +65,20 @@ impl CompositorData { scroll_offset: TypedPoint2D(0f32, 0f32), wants_scroll_events: wants_scroll_events, scroll_policy: scroll_policy, - unrendered_color: unrendered_color, + background_color: background_color, epoch: epoch, } } pub fn new_root(pipeline: CompositionPipeline, epoch: Epoch, - unrendered_color: Color) -> CompositorData { + background_color: Color) -> CompositorData { CompositorData::new(pipeline, LayerId::null(), epoch, WantsScrollEvents, FixedPosition, - unrendered_color) + background_color) } /// Adds a child layer to the layer with the given ID and the given pipeline, if it doesn't @@ -185,7 +185,7 @@ impl CompositorData { pub fn update_layer(layer: Rc>, layer_properties: LayerProperties) { layer.extra_data.borrow_mut().epoch = layer_properties.epoch; - layer.extra_data.borrow_mut().unrendered_color = layer_properties.background_color; + layer.extra_data.borrow_mut().background_color = layer_properties.background_color; layer.resize(layer_properties.rect.size); layer.contents_changed();