mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
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:
commit
c876592d84
5 changed files with 13 additions and 18 deletions
|
@ -7,13 +7,12 @@ use servo::{self, gl, webrender_api, BrowserId, Servo};
|
|||
use servo::compositing::windowing::{AnimationState, EmbedderCoordinates, MouseWindowEvent, WindowEvent, WindowMethods};
|
||||
use servo::embedder_traits::EmbedderMsg;
|
||||
use servo::embedder_traits::resources::{self, Resource};
|
||||
use servo::euclid::{Length, TypedPoint2D, TypedScale, TypedSize2D, TypedVector2D};
|
||||
use servo::euclid::{TypedPoint2D, TypedScale, TypedSize2D, TypedVector2D};
|
||||
use servo::msg::constellation_msg::TraversalDirection;
|
||||
use servo::script_traits::{MouseButton, TouchEventType};
|
||||
use servo::servo_config::opts;
|
||||
use servo::servo_config::prefs::{PrefValue, PREFS};
|
||||
use servo::servo_url::ServoUrl;
|
||||
use servo::style_traits::DevicePixel;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::mem;
|
||||
use std::path::PathBuf;
|
||||
|
@ -454,11 +453,7 @@ struct ServoCallbacks {
|
|||
}
|
||||
|
||||
impl WindowMethods for ServoCallbacks {
|
||||
fn prepare_for_composite(
|
||||
&self,
|
||||
_width: Length<u32, DevicePixel>,
|
||||
_height: Length<u32, DevicePixel>,
|
||||
) -> bool {
|
||||
fn prepare_for_composite(&self) -> bool {
|
||||
debug!("WindowMethods::prepare_for_composite");
|
||||
self.host_callbacks.make_current();
|
||||
true
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
//! A windowing implementation using winit.
|
||||
|
||||
use euclid::{Length, TypedPoint2D, TypedVector2D, TypedScale, TypedSize2D};
|
||||
use euclid::{TypedPoint2D, TypedVector2D, TypedScale, TypedSize2D};
|
||||
#[cfg(target_os = "windows")]
|
||||
use gdi32;
|
||||
use gleam::gl;
|
||||
|
@ -776,11 +776,12 @@ impl WindowMethods for Window {
|
|||
self.animation_state.set(state);
|
||||
}
|
||||
|
||||
fn prepare_for_composite(
|
||||
&self,
|
||||
_width: Length<u32, DevicePixel>,
|
||||
_height: Length<u32, DevicePixel>,
|
||||
) -> bool {
|
||||
fn prepare_for_composite(&self) -> bool {
|
||||
if let WindowKind::Window(ref window, ..) = self.kind {
|
||||
if let Err(err) = unsafe { window.context().make_current() } {
|
||||
warn!("Couldn't make window current: {}", err);
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue