mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
webgl: Make the api return the context limits and use them for validations
This allows keeping the VertexAttrib* calls asynchronous. Another option would be to do the validation in the apply() function, but that'd require us passing an unnecessary channel around and add extra synchronization. The counterpart of this is that it has to be updated when the context changes, but that's less problem.
This commit is contained in:
parent
8d7ee15ace
commit
6fcc03c965
7 changed files with 44 additions and 25 deletions
|
@ -14,7 +14,7 @@ use euclid::size::Size2D;
|
|||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::{Failure, NavigationDirection, PipelineId};
|
||||
use msg::constellation_msg::{LoadData, SubpageId};
|
||||
use offscreen_gl_context::GLContextAttributes;
|
||||
use offscreen_gl_context::{GLContextAttributes, GLLimits};
|
||||
use style_traits::cursor::Cursor;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use url::Url;
|
||||
|
@ -43,8 +43,8 @@ pub enum ScriptMsg {
|
|||
/// Requests that a new WebGL thread be created. (This is done in the constellation because
|
||||
/// WebGL uses the GPU and we don't want to give untrusted content access to the GPU.)
|
||||
CreateWebGLPaintThread(Size2D<i32>,
|
||||
GLContextAttributes,
|
||||
IpcSender<Result<IpcSender<CanvasMsg>, String>>),
|
||||
GLContextAttributes,
|
||||
IpcSender<Result<(IpcSender<CanvasMsg>, GLLimits), String>>),
|
||||
/// Dispatched after the DOM load event has fired on a document
|
||||
/// Causes a `load` event to be dispatched to any enclosing frame context element
|
||||
/// for the given pipeline.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue