Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCache drawingBufferWidth/drawingBufferHeight in WebGLRenderingContext #20530
Labels
Projects
Comments
bors-servo
added a commit
that referenced
this issue
Mar 31, 2020
webgl: Avoid IPC for drawingBufferWidth/Height APIs In the common case, there is no need to fetch the current webgl context's surface size every time these APIs are used. We only expect the values to change when the canvas is resized, or when an opaque framebuffer is bound, or the default framebuffer is bound when an opaque framebuffer was previously bound. We can store any previously determined surface size otherwise, and report it without any IPC. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #20530 - [x] There are tests for these changes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Those two values should be retrieved through a single
WebGLCommandmessage, and we should cache (and invalidate them properly when things change of course) on the DOM side inWebGLRenderingContextdirectly.