Commit Graph

258 Commits

Author SHA1 Message Date
Kearwood "Kip" Gilbert
6f85ed3a79 Bug 1400407 - Part 3: Remove IsMirror concept, as it is no longer used by WebVR,r=jgilbert
- This patch is the same as one from Bug 1382104 (Remove IsMirror concept
  in favor of checking forwarder).
- It is safe to uplift this patch without the rest of Bug 1382104 as long
  as the remaining Bug 1381084 is also uplifted.

MozReview-Commit-ID: 21YZObeSUa3

--HG--
extra : rebase_source : 8d543fe69f4ac9df5ccdc42d3ce47bb37eea4396
2017-08-28 14:50:14 -07:00
Kearwood "Kip" Gilbert
7f6e715fdf Bug 1400407 - Part 2: Cleanup DOM Canvas mirroring dead code,r=jgilbert
- Refactored out Canvas layer mirror specialization, no longer needed
  as we are no longer implementing a TextureForwarder to submit VR frames.

MozReview-Commit-ID: ArZO6M9kNLg

--HG--
extra : rebase_source : 2447bfb61b6575f0c6bdaf35ecd4656e7cfb762f
2017-09-15 15:06:56 -07:00
Kearwood "Kip" Gilbert
c5a2279e20 Bug 1400457 - Isolate VR Rendering from Compositor r=daoshengmu,jgilbert
- WebVR is no longer dependent on PTexture, TextureParent,
  TextureHost, and TextureChild.  It continues to use TextureClient
  for pooling and coordinating locks with other Gecko code.
- PreserveDrawingBuffer now behaving correctly for 2d display mirroring
- Preparation for separating to VR process
MozReview-Commit-ID: 2RGOulCInSu

--HG--
extra : rebase_source : 3542b804c3def36fa74541be32d0e7cbc9698641
2017-07-21 17:30:34 -07:00
dmu@mozilla.com
280b27a0fb Bug 1359055 - Part 1: PBO offset for WebGL compressedTexImage; r=baku,jgilbert
MozReview-Commit-ID: LN2diy41A2Z

--HG--
extra : rebase_source : d77ee2b289348e0609bac248dfab670c72623fa0
2017-07-18 18:02:57 +00:00
Chung-Sheng Fu
2077ced147 Bug 1217290 - Refactor WebGL max & min attribute constants for WebGL fingerprinting r=arthuredelstein,daoshengmu,jgilbert
MozReview-Commit-ID: 5fxOdV8euJ0

--HG--
extra : rebase_source : 6c961a6e1bb0bea22ee464b8e166994224170b03
2017-07-27 15:49:46 +08:00
Chung-Sheng Fu
886fe4b600 Bug 1217290 - Refine WebGLContext members r=daoshengmu,jgilbert
MozReview-Commit-ID: BjZCM1ygZ4k

--HG--
extra : rebase_source : eec6bbad8c6e27cb2e2c270194e6f1d50e83d16a
2017-07-27 15:49:21 +08:00
Chung-Sheng Fu
e99b682659 Bug 1217290 - Remove WebGLContext impl members r=daoshengmu,jgilbert
MozReview-Commit-ID: DPrjaf9QHfP

--HG--
extra : rebase_source : 903236ca4a0e0cf76a631188dfa58dc28d7641e4
2017-07-27 15:48:58 +08:00
Chung-Sheng Fu
d361e812da Bug 1217290 - Remove WebGLContext::MinCapabilityMode r=daoshengmu,jgilbert
MozReview-Commit-ID: 8Ggsjm8ReeR

--HG--
extra : rebase_source : f614706333c6ae5b01eab45926f7a949bfddfbe5
2017-07-27 15:48:35 +08:00
Nathan Froyd
c25b06189d Bug 1378474 - part 2 - label WebGLQuery's AvailableRunnable; r=jgilbert,billm
If we have an associated canvas element, the query should go in the
queue of the associated document.
2017-08-23 10:39:40 -04:00
Morris Tseng
2ad398aebc Bug 1391136 - Handle context lost in layers-free mode. r=jgilbert
MozReview-Commit-ID: 1J0EggRmM4i
2017-08-18 15:13:29 +08:00
Phil Ringnalda
525ef4d843 Backed out 7 changesets (bug 1390386) for Android crashes in testSettingsPages
Backed out changeset 22b11f9aedd3 (bug 1390386)
Backed out changeset caffdbefd427 (bug 1390386)
Backed out changeset 3364e6589731 (bug 1390386)
Backed out changeset ed6857bdc17b (bug 1390386)
Backed out changeset 1314405cf812 (bug 1390386)
Backed out changeset 9d16670edeb5 (bug 1390386)
Backed out changeset d1286d0d2c79 (bug 1390386)

MozReview-Commit-ID: 3V3ZFwrNaGE
2017-08-17 21:06:05 -07:00
Jeff Gilbert
365866b9f5 Bug 1390386 - Add GLContext::mImplicitMakeCurrent. - r=jrmuizel
MozReview-Commit-ID: 5iyGHNzoCpd
2017-08-17 16:15:48 -07:00
Morris Tseng
f3d4ff499f Bug 1379920 - Introduce CanvasRenderer and its derived classes. r=nical,jrmuizel
This patch move common canvas interfaces out of layer. So I create a
base class CanvasRenderer which move interfaces from CanvasLayer.
CopyableCanvasRenderer from CopyableCanvasLayer, ClientCanvasRenderer
from ClientCanvasLayer and WebRenderCanvasRenderer from
WebRenderCanvasLayer. And finally, WebRenderCanvasRendererSync for the
non layers free mode and WebRenderCanvasRendererAsync for the layers
free mode.

Summary all changes in this patch.
* Move class CanvasLayer::Data to CanvasRenderer.h and rename it to
CanvasInitializeData. Because this class not only use by layer but also
* Move BasicCanvasLayer::UpdateSurface to
CopyableCanvasRenderer::ReadbackSurface.
* CanvasClient::Update now accepts ShareableCanvasRenderer as parameter.
not CanvasLayer.
use by layers-free mode. Move it out of layer's class makes more sense.
* Add InitializeCanvasRenderer in the canvas related classes to
initialize CanvasRenderer without involved layer.
* All canvas layer has function "CreateCanvasRendererInternal" that
initialize corresponding CanvasRenderer.

* Description of all CanvasRenderer classes:
** CanvasRenderer: Based classes.
** CopyableCanvasRenderer: Can readback canvas content to a
SourceSurface. Use by BasicCanvasLayer.
** ShareableCanvasRenderer: Provide IPC capabilities that allow sending
canvas content over IPC. This is pure virtual class because the IPC handling is
different in different LayerManager.
** ClientCanvasRenderer: Implement IPC handling for ClientLayerManager.
Use by ClientCanvasLayer.
** WebRenderCanvasRenderer: Implement IPC handling for
WebRenderLayerManager.
** WebRenderCanvasRendererSync: Use by WebRenderCanvasLayer.
** WebRenderCanvasRendererAsync: Use by layers-free mode in WebRender.

class diagram shows below:

                      +--------------+
                      |CanvasRenderer|
                      +-------+------+
                              ^
                              |
                  +----------------------+
                  |CopyableCanvasRenderer|
                  +----------------------+
                              ^
                              |
                  +-----------+-----------+
                  |ShareableCanvasRenderer|
                  +-----+-----------------+
                        ^      ^
          +-------------+      +-------+
          |                            |
+--------------------+       +---------+-------------+
|ClientCanvasRenderer|       |WebRenderCanvasRenderer|
+--------------------+       +--------+--+-----------+
                                      ^  ^
              +-----------------------+  +----+
              |                               |
+-------------+-------------+   +-------------+--------------+
|WebRenderCanvasRendererSync|   |WebRenderCanvasRendererAsync|
+---------------------------+   +----------------------------+

MozReview-Commit-ID: 5hqQ19W169r
2017-08-03 13:55:14 +08:00
Samuel Vargas
3ca06f7de4 Bug 1376039 - Convert ValidateBlendFuncEnum to static func. r=jgilbert
--HG--
extra : rebase_source : 0f4603d54951436770388b79bcb6e5d4b7782f5e
2017-06-23 17:31:05 -07:00
Samuel Vargas
d7f0c12cd3 Bug 1376039 - WebGL Conformance Failure: deqp/functional/gles3/integerstatequery.html. r=jgilbert
--HG--
extra : rebase_source : b8beba46757c7218d573367be82e162737e4a1c7
2017-06-23 16:19:49 -07:00
Samuel Vargas
f36d75726e Bug 1367919 - Add tracking for data allocation calls in WebGL. r=jgilbert 2017-06-22 14:32:00 -04:00
Kirk Steuber
8c3a82a2d2 Bug 1370727 - Return void from nsICanvasRenderingContextInternal::SetIsOpaque r=bz
nsICanvasRenderingContextInternal::SetIsOpaque returns nsresult, but no implementations return errors. It should return void instead.

MozReview-Commit-ID: LrGouaeoCvo

--HG--
extra : rebase_source : a17432006aa073edaecf15424a3b350309d704c4
2017-06-09 12:15:42 -07:00
Samuel Vargas
901459a071 Bug 1325113 - Implement support for WEBGL_compressed_texture_s3tc_srgb - r=jgilbert,qdot
MozReview-Commit-ID: mI4dlB2lK
2017-06-08 14:54:37 -07:00
Tom Tromey
aa6e054b71 Bug 1334279 - mark vsprintf-likes with MOZ_FORMAT_PRINTF; r=froydnj
This annotates vsprintf-like functions with MOZ_FORMAT_PRINTF.  This may
provide some minimal checking of such calls (the GCC docs say that it
checks for the string for "consistency"); but in any case shouldn't
hurt.

MozReview-Commit-ID: HgnAK1LiorE

--HG--
extra : rebase_source : 9c8d715d6560f89078c26ba3934e52a2b5778b6a
2017-05-04 12:10:19 -06:00
Chih-Yi Leu
69868ff3ef Bug 1355430 - Part2: Implement Require Fastpath for texture copy; r=baku,jgilbert
MozReview-Commit-ID: EPNSJbbJHP4

--HG--
extra : rebase_source : 588225a4113010964341d5cbbefefa06e0c48056
2017-04-11 17:15:25 +08:00
Sebastian Hengst
e4c87ce902 Backed out changeset 661144609b7a (bug 1355430) 2017-04-18 21:08:22 +02:00
Chih-Yi Leu
ca2cb984d5 Bug 1355430 - Part2: Implement Require Fastpath for texture copy; r=baku,jgilbert
MozReview-Commit-ID: EPNSJbbJHP4

--HG--
extra : rebase_source : b27a254e247a40285873b53edb036b5b97d4e0d8
2017-04-11 17:15:25 +08:00
Jeff Gilbert
326703ec04 Bug 1355763 - Add gfxAlphaType for specifying opaque/premult/non-premult. - r=daoshengmu
MozReview-Commit-ID: Jzr8aPYlEcO
2017-04-13 09:14:34 -07:00
Iris Hsiao
bf9a6182a2 Backed out changeset f97fd860c168 (bug 1355763) 2017-04-13 14:46:43 +08:00
Jeff Gilbert
95c5ba8077 Bug 1355763 - Add gfxAlphaType for specifying opaque/premult/non-premult. - r=daoshengmu
MozReview-Commit-ID: Jzr8aPYlEcO
2017-04-12 22:03:43 -07:00
Jeff Gilbert
5108749361 Bug 1333858 - Intersect should be fallible on overflow. - r=daoshengmu
MozReview-Commit-ID: 6lmIKKyXXah
2017-04-04 12:56:21 -07:00
Jeff Gilbert
d401ac72c1 Bug 1339256 - Simplify index validation. - r=kvark
MozReview-Commit-ID: 4FALdIyhBP8
2017-03-09 18:57:43 -08:00
Jeff Gilbert
e63fc0df83 Bug 1339256 - Detect robust_buffer_access_behavior. - r=daoshengmu
MozReview-Commit-ID: 4w5D9bOQbY8
2017-03-09 18:57:41 -08:00
Tom Tromey
9b663e797b Bug 1060419 - make WebGLContextUtils.cpp use VsprintfLiteral, r=froydnj
MozReview-Commit-ID: JhwopeIpUMo

--HG--
extra : rebase_source : 8540864ed969ad038e996b22d78ec3b4f1ba3cb8
2016-12-09 13:48:22 -10:00
Jeff Gilbert
a719834c77 Bug 1330022 - Remove trivial ValidateUniformMatrixTranspose virtual. - r=kvark
Removing a file reshuffled our unified builds, so this includes the fixes that required as well.
MozReview-Commit-ID: 7ZIoG2xIlS9
2017-02-13 15:37:57 -08:00
Jeff Gilbert
5a028b1063 Bug 1330022 - Centralize VertexAttrib[I]Pointer calls to improve perf. - r=kvark
MozReview-Commit-ID: IcGNZhJTU5K
2017-02-13 15:37:54 -08:00
Sebastian Hengst
e430d3ec19 Backed out changeset 0528322db042 (bug 1330022) for failing test_conformance__more__functions__vertexAttribPointerBadArgs.htm. r=backout 2017-02-10 23:32:32 +01:00
Sebastian Hengst
2e61c07a59 Backed out changeset cd91d6b1b500 (bug 1330022) 2017-02-10 23:31:47 +01:00
Jeff Gilbert
19c60a97a2 Bug 1330022 - Remove trivial ValidateUniformMatrixTranspose virtual. - r=kvark
Removing a file reshuffled our unified builds, so this includes the fixes that required as well.
MozReview-Commit-ID: 7ZIoG2xIlS9
2017-02-10 13:31:10 -08:00
Jeff Gilbert
ef8ebd3d10 Bug 1330022 - Centralize VertexAttrib[I]Pointer calls to improve perf. - r=kvark
MozReview-Commit-ID: IcGNZhJTU5K
2017-02-10 13:31:08 -08:00
Boris Zbarsky
3e7fca5cf9 Bug 1335368 part 9. Stop using IsCallerChrome in WebGL. r=bholley 2017-02-01 15:43:37 -05:00
Jeff Gilbert
4da6480883 Bug 1329815 - GeneratePerfWarning and warn on completed-FB invalidation. - r=kvark
MozReview-Commit-ID: C9J3qdnsaZF
2017-01-17 17:44:56 -08:00
kvark
072ea09cfb Bug 1278199 - Reset viewport offset on SetDimensions and clamp to MAX_VIEWPORT_DIMS. r=jgilbert
--HG--
extra : rebase_source : 553fef64d3d8c04145a1c065c5b4217435a5f114
2017-01-10 14:15:00 -05:00
Jeff Gilbert
61b02e4fd7 Bug 1326159 - Update TF buffer restrictions. - r=daoshengmu
Update conformance2/buffers/bound-buffer-size-change-test.html to top-of-tree 2.0.0.

MozReview-Commit-ID: CgfP70Y0wul
2016-12-30 03:30:13 -08:00
Jeff Gilbert
0b065a7b71 Bug 1325301 (flattened) - Validate attribute base types match data base types. - r=bz,daoshengmu
Flattened with:
* Clean up generic vertex attribs. - r=bz,daoshengmu
* Remove EnsureAttrib() and friends. - r=daoshengmu
* Simplify EnumName behavior and usage and add ErrorInvalidEnumArg(). - r=daoshengmu
2016-12-29 02:46:46 -08:00
Jeff Gilbert
6cff55278b Bug 1325733 (flattened) - Mark read/draw calls better. - r=daoshengmu
Includes:
* ANGLE needs to call clear twice even on larger targets. - r=daoshengmu
2016-12-29 02:45:13 -08:00
Jeff Gilbert
3f9fc7d30d Bug 1325516 (flattened) - Misc fixes and simplify IMPL_COLOR_READ_FORMAT/TYPE and ensure that we only return valid ones. - r=daoshengmu 2016-12-25 13:44:49 -08:00
Jeff Gilbert
798acabef4 Bug 1325500 (flattened) - Fix DrawRangeElements impl and require size=4 for packed int types. - r=daoshengmu
MozReview-Commit-ID: B3YpgZn48Nl
2016-12-25 13:44:47 -08:00
Jeff Gilbert
ac2df6af8a Bug 1325476 - Use helper for Parameter[fi] funcs instead of maybeFloat/IntParam. - r=daoshengmu
MozReview-Commit-ID: 3jGFXfDNkPt
2016-12-25 13:44:38 -08:00
Jeff Gilbert
6091cfeb6e Bug 1312865 - ClearBuffer and similar funcs should mirror Clear's behavior. - r=daoshengmu
MozReview-Commit-ID: 4Gm5aNZ1PXX
2016-12-25 13:44:26 -08:00
Jeff Gilbert
8a9c965490 Bug 1324924 - Support ImageBitmap for Tex*Image*. (flattened) - r=bz,daoshengmu,mtseng
MozReview-Commit-ID: JzcbzeFHyHn
2016-12-20 19:24:25 -08:00
Jeff Gilbert
f7b2bc6226 Bug 1324598 - GENERATE_MIPMAP_HINT isn't queriable in Core Profiles. - r=daoshengmu
MozReview-Commit-ID: 6Z2MPmeFqv
2016-12-20 13:00:20 -08:00
Jeff Gilbert
7ca1cb79d0 Bug 1305832 - Move texture clearing code into WebGLTexture.cpp. - r=ethlin
MozReview-Commit-ID: 30UcfPZLYNz
2016-12-14 20:16:59 -08:00
Jeff Gilbert
49152faebc Bug 1305832 - ZeroTextureData doesn't need x/y/zOffset, so remove those args. - r=ethlin 2016-12-14 20:16:53 -08:00
Jeff Gilbert
1f193e4f38 Bug 1320030 - Handle program and shader object deletion differently. - r=ethlin
MozReview-Commit-ID: 4wSZ81lFP6e
2016-12-07 01:35:42 -08:00