Auto merge of #22048 - paulrouget:remove_prepare_for_composite_args, r=jdm

remove useless arguments from prepare_for_composite

Accidentally fixes #22009

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22009 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22048)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-10-30 07:54:10 -04:00 committed by GitHub
commit c876592d84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 18 deletions

View file

@ -1213,7 +1213,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
) -> Result<Option<Image>, UnableToComposite> {
let width = self.embedder_coordinates.framebuffer.width_typed();
let height = self.embedder_coordinates.framebuffer.height_typed();
if !self.window.prepare_for_composite(width, height) {
if !self.window.prepare_for_composite() {
return Err(UnableToComposite::WindowUnprepared);
}

View file

@ -11,7 +11,7 @@ use gleam::gl;
use keyboard_types::KeyboardEvent;
use msg::constellation_msg::{TopLevelBrowsingContextId, TraversalDirection};
use script_traits::{MouseButton, TouchEventType, TouchId};
use servo_geometry::{DeviceIndependentPixel, DeviceUintLength};
use servo_geometry::DeviceIndependentPixel;
use servo_url::ServoUrl;
use std::fmt::{Debug, Error, Formatter};
#[cfg(feature = "gleam")]
@ -129,7 +129,7 @@ pub trait WindowMethods {
/// Requests that the window system prepare a composite. Typically this will involve making
/// some type of platform-specific graphics context current. Returns true if the composite may
/// proceed and false if it should not.
fn prepare_for_composite(&self, width: DeviceUintLength, height: DeviceUintLength) -> bool;
fn prepare_for_composite(&self) -> bool;
/// Return the GL function pointer trait.
#[cfg(feature = "gleam")]
fn gl(&self) -> Rc<gl::Gl>;

View file

@ -82,7 +82,6 @@ use constellation::{FromCompositorLogger, FromScriptLogger};
use constellation::content_process_sandbox_profile;
use embedder_traits::{EmbedderMsg, EmbedderProxy, EmbedderReceiver, EventLoopWaker};
use env_logger::Builder as EnvLoggerBuilder;
use euclid::Length;
#[cfg(all(not(target_os = "windows"), not(target_os = "ios")))]
use gaol::sandbox::{ChildSandbox, ChildSandboxMethods};
use gfx::font_cache_thread::FontCacheThread;
@ -138,7 +137,7 @@ where
let opts = opts::get();
// Make sure the gl context is made current.
window.prepare_for_composite(Length::new(0), Length::new(0));
window.prepare_for_composite();
// Reserving a namespace to create TopLevelBrowserContextId.
PipelineNamespace::install(PipelineNamespaceId(0));