aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/webgl_mode
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-01-27 18:58:34 +0100
committerGitHub <noreply@github.com>2024-01-27 17:58:34 +0000
commitbc211f8ff387ea59bc8af7bb7394c7be7ca69597 (patch)
tree853b9a211de6e63d4d31295200bb86afb9c442a9 /components/canvas/webgl_mode
parentbbe505e52b611e682c6f3b34411a07c00a34f2b7 (diff)
downloadservo-bc211f8ff387ea59bc8af7bb7394c7be7ca69597.tar.gz
servo-bc211f8ff387ea59bc8af7bb7394c7be7ca69597.zip
gfx: Rename `WebrenderSurfman` to `RenderingContext` and move to `gfx` (#31184)
This is a small cleanup that moves and renames this class. The rename is simply because we are exposing a lot about the details of Servo's rendering in the API and it makes sense to start thinking about abstracting that away a bit. This also moves the struct to `gfx`, which does have an effect on Servo's dependency graph. This adds a new dependency on gfx to `compositing`, but `compositing` had a transitive dependency on gfx before through `canvas`.
Diffstat (limited to 'components/canvas/webgl_mode')
-rw-r--r--components/canvas/webgl_mode/inprocess.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/canvas/webgl_mode/inprocess.rs b/components/canvas/webgl_mode/inprocess.rs
index 749f0062aeb..ba9cee6ac02 100644
--- a/components/canvas/webgl_mode/inprocess.rs
+++ b/components/canvas/webgl_mode/inprocess.rs
@@ -8,13 +8,13 @@ use std::sync::{Arc, Mutex};
use canvas_traits::webgl::{webgl_channel, WebGLContextId, WebGLMsg, WebGLThreads};
use euclid::default::Size2D;
use fnv::FnvHashMap;
+use gfx::rendering_context::RenderingContext;
use log::debug;
use sparkle::gl::GlType;
use surfman::chains::{SwapChainAPI, SwapChains, SwapChainsAPI};
use surfman::{Device, SurfaceInfo, SurfaceTexture};
use webrender::RenderApiSender;
use webrender_api::DocumentId;
-use webrender_surfman::WebrenderSurfman;
use webrender_traits::{
WebrenderExternalImageApi, WebrenderExternalImageRegistry, WebrenderImageSource,
};
@@ -32,7 +32,7 @@ pub struct WebGLComm {
impl WebGLComm {
/// Creates a new `WebGLComm` object.
pub fn new(
- surfman: WebrenderSurfman,
+ surfman: RenderingContext,
webrender_api_sender: RenderApiSender,
webrender_doc: DocumentId,
external_images: Arc<Mutex<WebrenderExternalImageRegistry>>,
@@ -72,13 +72,13 @@ impl WebGLComm {
/// Bridge between the webrender::ExternalImage callbacks and the WebGLThreads.
struct WebGLExternalImages {
- surfman: WebrenderSurfman,
+ surfman: RenderingContext,
swap_chains: SwapChains<WebGLContextId, Device>,
locked_front_buffers: FnvHashMap<WebGLContextId, SurfaceTexture>,
}
impl WebGLExternalImages {
- fn new(surfman: WebrenderSurfman, swap_chains: SwapChains<WebGLContextId, Device>) -> Self {
+ fn new(surfman: RenderingContext, swap_chains: SwapChains<WebGLContextId, Device>) -> Self {
Self {
surfman,
swap_chains,