Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of changes #2 #512

Merged
merged 42 commits into from Jun 11, 2013
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c14a137
Update rust-geom
pcwalton May 29, 2013
233a204
Implement the beginnings of the box model for render boxes
pcwalton May 29, 2013
a1d1289
Add NSPR and NSS submodules
pcwalton May 29, 2013
0af3bbf
Add NSS and NSPR to the build
pcwalton May 29, 2013
2d1a00c
Don't clip layers to the screen area
pcwalton May 29, 2013
67eb533
Clamp scrolling to the page boundaries
pcwalton May 29, 2013
d97f002
Stop hammering on the compositor
pcwalton May 29, 2013
02c5772
Fix corrupted textures when resizing.
pcwalton May 30, 2013
dcfabb7
Don't try to remove whitespace twice if it's the only node.
pcwalton May 30, 2013
e2bcd36
Color links blue
pcwalton May 30, 2013
2e4cecc
Add flows if requested to the display list info.
pcwalton May 30, 2013
ea1a406
base and bounds methods for DisplayItem
May 25, 2013
f77eef5
Basic hit testing functionality
pcwalton May 31, 2013
facb707
Update rust-css and rust-netsurfcss
pcwalton May 31, 2013
d5e4793
Add horizontal borders, margins and padding. Broken until rust-css su…
May 30, 2013
708f9b4
Fix method names and dynamic borrow check failures
pcwalton May 31, 2013
0b91af3
Refactor a bit and compute vertical margins as well.
pcwalton May 31, 2013
72ca765
Update rust-css and fix some dynamic borrow check failures
pcwalton Jun 1, 2013
f1fcd4d
Add comments and compute heights properly
pcwalton Jun 1, 2013
cddf67a
Update border rendering
May 31, 2013
fb2ce2c
Rename `with_imm_base` to `with_base`.
pcwalton Jun 3, 2013
e6ff135
test_slam_layout, a new layout perf test case
pcwalton Jun 4, 2013
8d3b6ae
Stop rendering when script queries layout
pcwalton Jun 4, 2013
40a69fc
Address review comments
pcwalton Jun 4, 2013
7a435fc
Refactor document damage to distinguish it from layout/style damage.
pcwalton Jun 5, 2013
5750069
Use the scroll hack
pcwalton Jun 6, 2013
ae5b2df
Roll up block layout changes
pcwalton Jun 6, 2013
9c25474
Only warn, don't assert, if the node range length is zero.
pcwalton Jun 6, 2013
97eb567
Update the configure script to pass --enable-64bit
pcwalton Jun 6, 2013
c65d51f
Address review comments
pcwalton Jun 6, 2013
98a730c
Use full paths for submodules in the configure script
pcwalton Jun 6, 2013
bb6ae7a
Update NSS to fix build issues.
metajack Jun 11, 2013
5425154
Merge remote-tracking branch 'origin/master' into pcwalton-master
metajack Jun 11, 2013
a2c4f72
Fix spacing.
metajack Jun 11, 2013
4cf4302
Update nss.
metajack Jun 11, 2013
ea1c883
Fix warning.
metajack Jun 11, 2013
16ca6f2
Add missing field.
metajack Jun 11, 2013
a42cf9b
Fix types.
metajack Jun 11, 2013
b635079
Revert rust-css and rust-netsurfcss to working versions.
metajack Jun 11, 2013
f0692e5
Update rust-glut.
metajack Jun 11, 2013
a5e3605
Fix rust-css tests.
metajack Jun 11, 2013
cdd5de7
Disable tests for nspr and nss.
metajack Jun 11, 2013
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Fix corrupted textures when resizing.

  • Loading branch information
pcwalton committed May 30, 2013
commit 02c57728c550cf43c0709f3da3a8481fd6fe8e8d
@@ -4,6 +4,7 @@

use azure::azure_hl::{DrawTarget};
use geom::rect::Rect;
use geom::size::Size2D;

pub struct LayerBuffer {
draw_target: DrawTarget,
@@ -24,6 +25,6 @@ pub struct LayerBufferSet {
/// The interface used to by the renderer to acquire draw targets for each rendered frame and
/// submit them to be drawn to the display.
pub trait Compositor {
fn paint(&self, layer_buffer_set: LayerBufferSet);
fn paint(&self, layer_buffer_set: LayerBufferSet, new_size: Size2D<uint>);
}

@@ -50,8 +50,6 @@ pub fn render_layers(layer_ref: *RenderLayer,
let width = right - x;
let height = bottom - y;

let tile_rect = Rect(Point2D(x, y), Size2D(width, height));

// Round the width up the nearest 32 pixels for DMA on the Mac.
let aligned_width = if width % 32 == 0 {
width
@@ -63,6 +61,8 @@ pub fn render_layers(layer_ref: *RenderLayer,

debug!("tile aligned_width %u", aligned_width);

let tile_rect = Rect(Point2D(x, y), Size2D(aligned_width, height));

let buffer;
// FIXME: Try harder to search for a matching tile.
// FIXME: Don't use shift; it's bad for perf. Maybe reverse and pop.
@@ -75,7 +75,7 @@ pub fn render_layers(layer_ref: *RenderLayer,

let size = Size2D(aligned_width as i32, height as i32);
// FIXME: This may not be always true.
let stride = size.width * 4;
let stride = (aligned_width as i32) * 4;

let mut data: ~[u8] = ~[0];
let offset;
@@ -162,7 +162,7 @@ impl<C: Compositor + Owned> Renderer<C> {
};

debug!("renderer: returning surface");
self.compositor.paint(layer_buffer_set);
self.compositor.paint(layer_buffer_set, render_layer.size);
}
}
}
@@ -60,8 +60,10 @@ impl CompositorTask {

/// Messages to the compositor.
pub enum Msg {
Paint(LayerBufferSet),
Exit
/// Requests that the compositor paint the given layer buffer set for the given page size.
Paint(LayerBufferSet, Size2D<uint>),
/// Requests that the compositor shut down.
Exit,
}

/// Azure surface wrapping to work with the layers infrastructure.
@@ -132,8 +134,11 @@ fn run_main_loop(port: Port<Msg>,
match port.recv() {
Exit => *done = true,

Paint(new_layer_buffer_set) => {
Paint(new_layer_buffer_set, new_size) => {
debug!("osmain: received new frame");

*page_size = Size2D(new_size.width as f32, new_size.height as f32);

let mut new_layer_buffer_set = new_layer_buffer_set;

// Iterate over the children of the container layer.
@@ -142,7 +147,6 @@ fn run_main_loop(port: Port<Msg>,
// Replace the image layer data with the buffer data. Also compute the page
// size here.
let buffers = util::replace(&mut new_layer_buffer_set.buffers, ~[]);
let mut (page_width, page_height) = (0.0f32, 0.0f32);

for buffers.each |buffer| {
let width = buffer.rect.size.width as uint;
@@ -181,10 +185,6 @@ fn run_main_loop(port: Port<Msg>,
let origin = buffer.rect.origin;
let origin = Point2D(origin.x as f32, origin.y as f32);

// Update the page width and height calculations.
page_width = page_width.max(&(origin.x + (width as f32)));
page_height = page_height.max(&(origin.y + (height as f32)));

// Set the layer's transform.
let transform = original_layer_transform.translate(origin.x,
origin.y,
@@ -193,8 +193,6 @@ fn run_main_loop(port: Port<Msg>,
image_layer.common.set_transform(transform)
}

*page_size = Size2D(page_width, page_height);

// TODO: Recycle the old buffers; send them back to the renderer to reuse if
// it wishes.

@@ -265,8 +263,8 @@ fn run_main_loop(port: Port<Msg>,

/// Implementation of the abstract `Compositor` interface.
impl Compositor for CompositorTask {
fn paint(&self, layer_buffer_set: LayerBufferSet) {
self.chan.send(Paint(layer_buffer_set))
fn paint(&self, layer_buffer_set: LayerBufferSet, new_size: Size2D<uint>) {
self.chan.send(Paint(layer_buffer_set, new_size))
}
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.