mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Reduce max line length from 150 to 120 characters
Part of https://github.com/servo/servo/issues/6041
This commit is contained in:
parent
7561f7b83f
commit
8e3f4bba85
141 changed files with 1161 additions and 497 deletions
|
@ -213,7 +213,8 @@ impl<'a> CanvasPaintTask<'a> {
|
|||
Canvas2dMsg::Fill => painter.fill(),
|
||||
Canvas2dMsg::Stroke => painter.stroke(),
|
||||
Canvas2dMsg::Clip => painter.clip(),
|
||||
Canvas2dMsg::DrawImage(imagedata, image_size, dest_rect, source_rect, smoothing_enabled) => {
|
||||
Canvas2dMsg::DrawImage(imagedata, image_size, dest_rect, source_rect,
|
||||
smoothing_enabled) => {
|
||||
painter.draw_image(imagedata, image_size, dest_rect, source_rect, smoothing_enabled)
|
||||
}
|
||||
Canvas2dMsg::DrawImageSelf(image_size, dest_rect, source_rect, smoothing_enabled) => {
|
||||
|
@ -245,7 +246,8 @@ impl<'a> CanvasPaintTask<'a> {
|
|||
Canvas2dMsg::SetTransform(ref matrix) => painter.set_transform(matrix),
|
||||
Canvas2dMsg::SetGlobalAlpha(alpha) => painter.set_global_alpha(alpha),
|
||||
Canvas2dMsg::SetGlobalComposition(op) => painter.set_global_composition(op),
|
||||
Canvas2dMsg::GetImageData(dest_rect, canvas_size, chan) => painter.get_image_data(dest_rect, canvas_size, chan),
|
||||
Canvas2dMsg::GetImageData(dest_rect, canvas_size, chan)
|
||||
=> painter.get_image_data(dest_rect, canvas_size, chan),
|
||||
Canvas2dMsg::PutImageData(imagedata, image_data_rect, dirty_rect)
|
||||
=> painter.put_image_data(imagedata, image_data_rect, dirty_rect),
|
||||
}
|
||||
|
|
|
@ -30,9 +30,9 @@ unsafe impl Send for WebGLPaintTask {}
|
|||
impl WebGLPaintTask {
|
||||
fn new(size: Size2D<i32>) -> Result<WebGLPaintTask, &'static str> {
|
||||
// TODO(ecoal95): Get the GLContextAttributes from the `GetContext` call
|
||||
let context = try!(GLContext::create_offscreen_with_color_attachment(size,
|
||||
GLContextAttributes::default(),
|
||||
ColorAttachmentType::TextureWithSurface));
|
||||
let context = try!(
|
||||
GLContext::create_offscreen_with_color_attachment(
|
||||
size, GLContextAttributes::default(), ColorAttachmentType::TextureWithSurface));
|
||||
Ok(WebGLPaintTask {
|
||||
size: size,
|
||||
original_context_size: size,
|
||||
|
@ -50,10 +50,13 @@ impl WebGLPaintTask {
|
|||
CanvasWebGLMsg::CreateBuffer(chan) => self.create_buffer(chan),
|
||||
CanvasWebGLMsg::DrawArrays(mode, first, count) => self.draw_arrays(mode, first, count),
|
||||
CanvasWebGLMsg::EnableVertexAttribArray(attrib_id) => self.enable_vertex_attrib_array(attrib_id),
|
||||
CanvasWebGLMsg::GetAttribLocation(program_id, name, chan) => self.get_attrib_location(program_id, name, chan),
|
||||
CanvasWebGLMsg::GetAttribLocation(program_id, name, chan) =>
|
||||
self.get_attrib_location(program_id, name, chan),
|
||||
CanvasWebGLMsg::GetShaderInfoLog(shader_id, chan) => self.get_shader_info_log(shader_id, chan),
|
||||
CanvasWebGLMsg::GetShaderParameter(shader_id, param_id, chan) => self.get_shader_parameter(shader_id, param_id, chan),
|
||||
CanvasWebGLMsg::GetUniformLocation(program_id, name, chan) => self.get_uniform_location(program_id, name, chan),
|
||||
CanvasWebGLMsg::GetShaderParameter(shader_id, param_id, chan) =>
|
||||
self.get_shader_parameter(shader_id, param_id, chan),
|
||||
CanvasWebGLMsg::GetUniformLocation(program_id, name, chan) =>
|
||||
self.get_uniform_location(program_id, name, chan),
|
||||
CanvasWebGLMsg::CompileShader(shader_id) => self.compile_shader(shader_id),
|
||||
CanvasWebGLMsg::CreateProgram(chan) => self.create_program(chan),
|
||||
CanvasWebGLMsg::CreateShader(shader_type, chan) => self.create_shader(shader_type, chan),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue