Commit Graph

142 Commits

Author SHA1 Message Date
Benoit Jacob
a959069916 Bug 707033 - Kill the hashtables of WebGLUniformLocation's held by WebGLProgram's - r=jgilbert
Currently, WebGLProgram holds a hashtable of refptrs to all WebGLUniformLocation's created from it.

It's used for one thing: to ensure that multiple getUniformLocation() calls on same uniform return the same WebGLUniformLocation object.

However, in a discussion on the public_webgl mailing list this week, we agreed that this was not mandated by the spec and that on the contrary, to ensure consistent behavior across browsers, we're going to require that NOT to happen. So this becomes a conformance issue.

Removing this hashtable also simplifies code and ownership patterns.
2011-12-04 14:15:43 -05:00
Benoit Jacob
dc5723fe15 Bug 705904 - [6/6] - Kill nsRefPtrHashtables of WebGL objects, allow unreferenced objects to be freed, fix about:memory reporting of deleted objects - r=jgilbert
This patch takes care of WebGLFramebuffer.
2011-12-04 14:15:43 -05:00
Benoit Jacob
f99eb362c0 Bug 705904 - [5/6] - Kill nsRefPtrHashtables of WebGL objects, allow unreferenced objects to be freed, fix about:memory reporting of deleted objects - r=jgilbert
This patch takes care of WebGLRenderbuffer.
2011-12-04 14:15:43 -05:00
Benoit Jacob
cc4ac52540 Bug 705904 - [4/6] - Kill nsRefPtrHashtables of WebGL objects, allow unreferenced objects to be freed, fix about:memory reporting of deleted objects - r=jgilbert
This patch takes care of WebGLShader.
2011-12-04 14:15:43 -05:00
Benoit Jacob
60f1ae571c Bug 705904 - [3/6] - Kill nsRefPtrHashtables of WebGL objects, allow unreferenced objects to be freed, fix about:memory reporting of deleted objects - r=jgilbert
This patch takes care of WebGLProgram.
2011-12-04 14:15:43 -05:00
Benoit Jacob
f86dc75f37 Bug 705904 - [2/6] - Kill nsRefPtrHashtables of WebGL objects, allow unreferenced objects to be freed, fix about:memory reporting of deleted objects - r=jgilbert
This patch takes care of WebGLBuffer.
2011-12-04 14:15:43 -05:00
Benoit Jacob
d295edc325 Bug 705904 - [1/6] - Kill nsRefPtrHashtables of WebGL objects, allow unreferenced objects to be freed, fix about:memory reporting of deleted objects - r=jgilbert
This patch takes care of WebGLTexture, and introduces the WebGLFastArray helper (see comment).
2011-12-04 14:15:43 -05:00
Benoit Jacob
cbefb6a7a2 Bug 704839 - [4/9] - Refactor mutual ownership of WebGL objects - r=jgilbert
This patch switches to the new mutual ownership pattern for WebGL objects, based on maintaining a second WebGL-specific refcount mirroring the OpenGL refcount which we can't access, using the helper classes that were introduced in patches 1 and 2.
2011-12-04 14:15:42 -05:00
Benoit Jacob
b39d1c2e9f Bug 705668 - Remove IIDs on WebGL implementation classes - r=ehsan
These IIDs were used in the past to check, using do_QueryInterface, that the objects passed to WebGL functions were really of the expected type. Now that WebGL classes are marked 'builtinclass' in the IDL and that check has been removed (see bug 638328), none of that is needed anymore.
2011-12-04 14:15:42 -05:00
Doug Sherk
6b8258d114 Bug 660070: catch EGL_CONTEXT_LOST and send WebGL an event for it r=bjacob
Catches the EGL_CONTEXT_LOST error which occurs after driver resets, and sends a
WebGL context the canvas event webglcontextlost when this occurs.
2011-12-02 23:52:35 -08:00
Michael Wu
8ded2a05cd Bug 703307 - Fix build/crash in gonk, r=cjones 2011-11-22 11:51:51 -08:00
Doug Sherk
e6a246b74c Bug 656824: changed WebGL robustness timer to not get reset after each draw operation r=bjacob
This patch should improve performance of the robustness timer by not resetting
it each time a draw operation happens. It still checks if there's any activity
and, if not, it will stop firing it. It includes a single extra timer firing
after activity dies to make sure we don't miss anything. Also includes a fix for
robustness being marked as existing when it really isn't.
2011-11-18 22:57:29 -05:00
Benoit Jacob
2e4e1bd781 Bug 699516 - Rename WEBKIT_lose_context to WEBGL_EXT_lose_context - r=dsherk
See today's discussion on public_webgl list. WEBGL_EXT_lose_context will be officially created in a few days.
2011-11-03 20:29:57 -04:00
Benoit Jacob
1ac69bdbd8 Bug 699522 - WebGL lose_context extension was not listed by webgl.getSupportedExtensions() - r=dsherk 2011-11-03 15:52:52 -04:00
Doug Sherk
b0cc51bfe5 Bug 695912: allow forcing MSAA on r=jgilbert
Allows forcing MSAA on even if we determine through the blocklist that the user
probably shouldn't be running it.
2011-11-03 10:50:40 -04:00
Doug Sherk
332f23c4b9 Bug 695912: implemented antialiasing blocklisting r=jgilbert
Antialiasing can be blocked through the downloaded blocklist now, as well as
static analysis compiled into the OS-specific handlers for graphics features.
2011-11-03 10:50:40 -04:00
Benoit Jacob
688f2ae9c1 Bug 677543 - Not clearing WebGL framebuffer in teapot demo - r=jgilbert
We are supposed to clear the WebGL framebuffer after it's been presented to the compositor and before the next draw operation, and were using the wrong way to know when we got composited. The right way is DidTransactionCallback.
2011-10-31 17:14:12 -04:00
Doug Sherk
63e6006511 Bug 656824: Implemented ARB_robustness to detect driver resets in WebGL, only on GLX for now - r=bjacob
This patch implements ARB_robustness on GLX and allows scripts to handle driver resets
through events. The changes in this patch are very sweeping; they hit almost
every NS_IMETHODIMP function within WebGLContextGL.cpp and WebGLContext.cpp.
More work must be done on this to support EGL_CONTEXT_LOST.
2011-10-26 16:00:44 -04:00
Jeff Gilbert
d8f97c2d0d Bug 615976 - Adds support for samples in ContextFormat, pref 'webgl.max-samples' - r=bjacob 2011-10-19 15:09:57 -04:00
Jeff Gilbert
ac985089ee Bug 681791 - Fixes GLContext::ResizeOffscreen leaving a mess on failure - r=bjacob 2011-10-19 15:09:57 -04:00
Benoit Jacob
4bbab81c93 Back out Jeff's patches because they lack a Bug number and/or a r= field. Sorry, should have checked that. Re-landing. 2011-10-19 15:31:33 -04:00
Jeff Gilbert
cc847aa544 Adds support for samples in ContextFormat, pref 'webgl.max-samples' 2011-10-19 15:09:57 -04:00
Jeff Gilbert
d3ef700073 Bug 681791 - Fixes GLContext::ResizeOffscreen leaving a mess on failure
* * *
try: -b do -p all -u all -t all
2011-10-19 15:09:57 -04:00
Ehsan Akhgari
2a602a5685 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Christoph Diehl
3fcd8718cf Bug 686732 - Implement minimal-capabilities WebGL mode - r=bjacob 2011-10-13 08:09:22 -04:00
Doug Sherk
5b5702d6a4 Bug 684853: implement OES_standard_derivatives
Implemented OES_standard_derivatives and fallbacks if it isn't available. Exposes dFdx, dFdy, and fwidth functions to WebGL scripts.
2011-10-01 00:45:50 -04:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Jeff Muizelaar
6f22e3e5d3 Bug 684859. Add telemetry to track when 2d or webgl canvas is used. r=bas
--HG--
extra : transplant_source : %FB5%40%FA%3A%2Cg%AF%14W%D3%E8%D1y%03%25%D1%E9%22%AB
2011-09-19 16:08:56 -04:00
Benoit Jacob
4e7482058c Bug 658856 - implement drawingbufferWidth/Height - r=jmuizelaar
These are new WebGLRenderingContext attributes exposing the actual drawing buffer size
2011-09-01 15:28:34 -04:00
Benoit Jacob
b097dfda2f Bug 669013 - Despite supporting OES_texture_float, getSupportedExtensions still returns no extensions - r=joe 2011-08-15 15:53:02 -04:00
Benoit Jacob
d2d4229f08 Bug 674074 - about:memory blank in presence of WebGL contexts - r=njn
This fixes the names of WebGL KIND_HEAP reporters. Newly enforced rules about the naming of KIND_HEAP reporters were making about:memory fail to work in presence of WebGL reporters.
2011-07-27 14:46:15 -04:00
Benoit Jacob
b9a7e5c7a7 Bug 665070 - part 4: rename mSynthesizedGLError to mWebGLError - r=jrmuizel 2011-07-07 20:01:16 -04:00
Benoit Jacob
841401e430 Bug 638549 - WebGL about:memory - part 5: add accounting for WebGLShaders - r=jrmuizel 2011-07-07 20:01:16 -04:00
Benoit Jacob
96182b8481 Bug 638549 - WebGL about:memory - part 4: add accounting for WebGLBuffer caches - r=jrmuizel 2011-07-07 20:01:16 -04:00
Benoit Jacob
be0be579a8 Bug 638549 - WebGL about:memory - part 3: add accounting for WebGLRenderbuffers - r=jrmuizel 2011-07-07 20:01:16 -04:00
Benoit Jacob
a5bcb15e9c Bug 638549 - WebGL about:memory - part 2: add accounting for WebGLBuffers - r=jrmuizel 2011-07-07 20:01:15 -04:00
Benoit Jacob
2dbf369778 Bug 638549 - WebGL about:memory - part 1: initial implementation accounting for WebGLContexts and WebGLTextures - r=jrmuizel 2011-07-07 20:01:12 -04:00
Masayuki Nakano
baf54af560 Bug 663039 content should use mozilla::Preferences r=roc+jwatt+chris.double+bjacob 2011-07-07 11:00:02 +09:00
Benoit Jacob
47b4b6b59e Bug 664066 - Initialize GL values - r=karlt
This patch initializes by zero the GL max values before we query them, just in case a buggy OpenGL implementation's glGetIntegerv function would fail to set them.

This patch also manually sets the initial values of mPixelStorePackAlignment and mPixelStoreUnpackAlignment as per the spec, rather than querying them from the GL.
2011-06-27 13:27:04 -04:00
Benoit Jacob
46f5712e1f Bug 659842 - about:support was creating a WebGL context even if webgl.disabled=true - r=karlt
This patch removes SafeToCreateCanvas3DContext, and checks webgl.disabled in WebGLContext::SetDimensions.
2011-06-10 15:02:06 -04:00
Ed Morley
9e71e5b9ac Bug 614515 - Remove MOZ_SVG conditions. r=roc 2011-05-30 09:34:50 +02:00
Benoit Jacob
3b22833d8a Bug 636942 - stencil separate param validation must now occur on draw calls - r=jrmuizel
We were validating these params when they're set, and that was non-conformant behavior.
2011-05-20 15:53:53 -04:00
Benoit Jacob
c8c2f484a2 Bug 636913 - implement the WebGL backbuffer clear semantics - r=joedrew
This implements the WebGL backbuffer clearing behavior when preserveDrawingBuffer=false
2011-05-20 15:53:53 -04:00
Benoit Jacob
58ec34d2c2 Bug 636913 - implement ForceClearFramebufferWithDefaultValues from the existing renderbuffer init code - r=joedrew
This is just moving code around, in preparation for implementing the WebGL buffer clear semantics in the next part.
2011-05-20 15:53:53 -04:00
Benoit Jacob
ee5166d905 Bug 636913 - state tracking needed for WebGL clear semantics - r=joedrew
We needed to remember more values instead of just passing them to the GL.
2011-05-20 15:53:53 -04:00
Benoit Jacob
841076288a Bug 636913 - fix context options - r=joedrew
The WebGL context options were out of date.
2011-05-20 15:53:53 -04:00
Benoit Jacob
779f99fd6c Bug 630672 - fixes for WebGL OES_texture_float extension - r=joedrew
This fixes a few issues in Vlad's patch: pass test, break reference cycle, fix leak
2011-05-20 15:53:53 -04:00
Vladimir Vukicevic
4b2230fe03 Bug 630672 - implement WebGL OES_texture_float extension - r=bjacob
This implements floating-point textures in WebGL
2011-05-20 15:53:53 -04:00
Benjamin Peterson
00688a9856 Bug 421865 - Handle zero dimensions correctly in canvas GetWidthHeight(). r=joe sr=roc 2011-05-19 12:49:18 +02:00
Benoit Jacob
1f4e4cc378 Bug 653419 - check for null gl ptr in SetDimensions NOP path - r=joedrew
WebGLContext::SetDimensions has an early success exit path when the dimensions are unchanged. However it wasn't checking that the gl pointer was non-null. Thus, after a failed WebGL context creation, such a SetDimensions call could incorrectly "succeed", only to crash when dereferencing the gl pointer.
2011-05-06 14:44:26 -04:00