From 4c0f8c8ac031ab84635b0ce0fc3586f5f74689a5 Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Mon, 7 Jul 2014 16:16:42 -0700 Subject: [PATCH] Rename get_buffer_requests to send_buffer_requests_recursively --- src/components/compositing/compositor.rs | 3 ++- src/components/compositing/compositor_data.rs | 22 +++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/compositing/compositor.rs b/src/components/compositing/compositor.rs index 0e35ce30498..2107928a719 100644 --- a/src/components/compositing/compositor.rs +++ b/src/components/compositing/compositor.rs @@ -772,7 +772,8 @@ impl IOCompositor { match self.scene.root { Some(ref mut layer) if !layer.extra_data.borrow().hidden => { let rect = Rect(Point2D(0f32, 0f32), page_window.to_untyped()); - let recomposite = CompositorData::get_buffer_request(layer.clone(), + let recomposite = + CompositorData::send_buffer_requests_recursively(layer.clone(), &self.graphics_context, rect, scale.get()); diff --git a/src/components/compositing/compositor_data.rs b/src/components/compositing/compositor_data.rs index 5712efc9e34..0a72fd955cb 100644 --- a/src/components/compositing/compositor_data.rs +++ b/src/components/compositing/compositor_data.rs @@ -338,11 +338,11 @@ impl CompositorData { // Given the current window size, determine which tiles need to be (re-)rendered and sends them // off the the appropriate renderer. Returns true if and only if the scene should be repainted. - pub fn get_buffer_request(layer: Rc>, - graphics_context: &NativeCompositingGraphicsContext, - window_rect: Rect, - scale: f32) - -> bool { + pub fn send_buffer_requests_recursively(layer: Rc>, + graphics_context: &NativeCompositingGraphicsContext, + window_rect: Rect, + scale: f32) + -> bool { let (request, unused) = Layer::get_tile_rects_page(layer.clone(), window_rect, scale); let redisplay = !unused.is_empty(); if redisplay { @@ -366,7 +366,7 @@ impl CompositorData { CompositorData::build_layer_tree(layer.clone(), graphics_context); } - let get_child_buffer_request = |kid: &Rc>| -> bool { + let send_child_buffer_request = |kid: &Rc>| -> bool { match kid.extra_data.borrow().scissor { Some(scissor) => { let mut new_rect = window_rect; @@ -380,10 +380,10 @@ impl CompositorData { // to make the child_rect appear in coordinates local to it. let child_rect = Rect(new_rect.origin.sub(&scissor.origin), new_rect.size); - CompositorData::get_buffer_request(kid.clone(), - graphics_context, - child_rect, - scale) + CompositorData::send_buffer_requests_recursively(kid.clone(), + graphics_context, + child_rect, + scale) } None => { false // Layer is offscreen @@ -395,7 +395,7 @@ impl CompositorData { }; layer.children().iter().filter(|x| !x.extra_data.borrow().hidden) - .map(get_child_buffer_request) + .map(send_child_buffer_request) .any(|b| b) || redisplay }