mirror of
https://github.com/servo/servo
synced 2026-05-03 12:52:25 +02:00
script: Report associated memory for webgl objects (#42570)
As started in https://github.com/servo/servo/issues/42168 let's report memory pressure for webgl objects. CanvasContexts report memory twice: once because of underlying texture object and once by themself, but that's okay as we also need to account for swapchain textures. Computing exact size would be to much work and code so we report rough estimations. Testing: None Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
@@ -14,7 +14,7 @@ use crate::dom::webgl::webglobject::WebGLObject;
|
||||
use crate::dom::webgl::webglrenderingcontext::{Operation, WebGLRenderingContext};
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
#[dom_struct(associated_memory)]
|
||||
pub(crate) struct WebGLVertexArrayObject {
|
||||
webgl_object_: WebGLObject,
|
||||
array_object: VertexArrayObject,
|
||||
|
||||
Reference in New Issue
Block a user