Commit Graph

383 Commits

Author SHA1 Message Date
Milan Sreckovic
dd6aa8383f Bug 1217192 - Use gfxCriticalNote where we're already using the non-default construction parameter. r=mchang 2015-10-21 14:34:00 +02:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd
583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Milan Sreckovic
f18b559b55 Bug 1200021 - Part 2: more diagnostics. r=bas
--HG--
extra : rebase_source : 41c8648c26d2b7a8c2ee68b823e911b0fdce7f96
2015-09-24 10:44:40 -04:00
David Anderson
497eea35bc Disable screen and multiply mix-blend-mode support in the D3D11 and OGL compositors. (bug 1135271, r=mattwoodrow) 2015-10-07 16:38:19 -07:00
David Anderson
3716363c72 Remove the static compositor backend variable. (bug 1211109 part 2, r=mattwoodrow) 2015-10-05 23:39:00 -07:00
David Anderson
f35bf0138b Log initialization failures in CompositorD3D11.cpp. (bug 1211109 part 1, r=mattwoodrow) 2015-10-05 23:38:40 -07:00
David Anderson
1befc42825 Don't use Direct2D if CompositorD3D11::Initialize fails. (bug 1208638, r=jrmuizel) 2015-10-01 23:06:43 -07:00
Wes Kocher
eff494e681 Backed out changeset 919a831786f1 (bug 1208638) for windows build failures 2015-09-30 16:43:26 -07:00
David Anderson
b0e2473678 Don't use Direct2D if CompositorD3D11::Initialize fails. (bug 1208638, r=jrmuizel)
--HG--
extra : rebase_source : 2c0b1febd9bcc3a52f48a98243ab853f5b58848d
2015-09-30 16:16:16 -07:00
David Anderson
e0b771c314 Fail gracefully when we can't get a texture sync handle. (bug 1207665 part 4, r=bas,vladan) 2015-09-29 11:20:01 -07:00
David Anderson
ce3e7b5ae7 Get the sync texture's sync handle during compositor initialization, where it can be made to fail gracefully. (bug 1207665 part 3, r=bas) 2015-09-29 11:16:16 -07:00
Jeff Muizelaar
37ae0e16b5 Bug 1194335. Disable partial present on Nvidia hardware. r=bas
I have a theory that bug 1189940 is caused by partial present. This
is an attempt to see if that's true.

--HG--
extra : rebase_source : 663613989e5a1b012909e1335595fac495c81478
2015-09-21 11:52:01 -04:00
Nicolas Silva
953150ec3d Bug 1072313 - Never call TextureClient::KeepUntilFullDeallocation off the ipdl thread. r=mattwoodrow 2015-09-21 16:54:40 +02:00
Wes Kocher
c6aa53d157 Backed out changeset 09c2a214244b (bug 1072313) for Windows textureclient crashes CLOSED TREE 2015-09-21 10:37:07 -07:00
Nicolas Silva
554272fa7f Bug 1072313 - Never call TextureClient::KeepUntilFullDeallocation off the ipdl thread. r=mattwoodrow 2015-09-21 16:54:40 +02:00
David Anderson
b8fb04e7b8 Handle screen and multiply blend modes in the D3D11 compositor. (bug 1203829 part 4, r=mattwoodrow) 2015-09-15 01:04:37 -07:00
David Anderson
250032dd90 Refactor shader initialization in CompositorD3D11. (bug 1203829 part 3, r=mattwoodrow) 2015-09-15 01:04:17 -07:00
David Anderson
4dcdb71497 Compile shaders with newer fxc. (bug 1203829 part 2, r=mattwoodrow) 2015-09-15 01:04:09 -07:00
Matt Woodrow
fb01190fe1 Bug 1199361 - Add texture memory reporters for YCbCr TextureClients. r=jrmuizel
--HG--
extra : rebase_source : 56c1ec34c1d4285117fef854aebaf2bbf8b1a93a
2015-09-01 15:33:40 -04:00
Carsten "Tomcat" Book
12570b009b Backed out changeset edc0db4368a0 (bug 1199361) for suspicion of making OS X 10.6 reftest failing very frequently 2015-09-03 08:39:48 +02:00
Matt Woodrow
16d971851f Bug 1199361 - Add texture memory reporters for YCbCr TextureClients. r=jrmuizel
--HG--
extra : rebase_source : d3646e8481e0767d707f2e7e1bfdad84fd58550f
2015-09-01 15:33:40 -04:00
Jamie Nicol
ff450822a4 Bug 1192058 - For DXGI_PRESENT_PARAMETERS, set pDirtyRects to nullptr if DirtyRectsCount == 0. r=BenWa 2015-08-18 15:11:25 +01:00
Jamie Nicol
991ab71c34 Bug 1191463 - Handle possible ID3D10Texture2D::Map() failure. r=Bas
--HG--
extra : rebase_source : 848a578cce2e05580a1e0374f799931f1b4dfb0b
2015-08-18 17:53:56 +01:00
Matt Woodrow
d07dcdfcf6 Bug 1195527 - Part 1: Move D3D11 texture allocation into the TextureClient. r=jrmuizel 2015-08-18 21:04:14 -04:00
Matt Woodrow
cbdfff6689 Bug 1195531 - Don't discard d3d11 textures when we move the TextureSource to a new compositor. r=jrmuizel,nical 2015-08-18 14:32:33 -04:00
Jeff Muizelaar
5d1283f868 Bug 1194335. Use a StackArray for RECTS so we see them in the minidumps. r=mattwoodrow
It will be faster too.
2015-08-13 17:01:10 -04:00
Bas Schouten
f99f040ff9 Bug 1190950: Check mappings and surfaces for UpdateFromSurface more robustly. r=mattwoodrow 2015-08-06 02:29:47 +00:00
Vladimir Vukicevic
0fbbbcc354 Bug 1188700, [webvr] Fix VR distortion compositing in d3d11/gl to take into account rendertarget size and transform; r=kip 2015-07-29 14:39:47 -04:00
Vladimir Vukicevic
15bf1c4c1d Bug 1167326, fix up VR distortion constant buffer; r=bas 2015-07-29 14:39:47 -04:00
Vladimir Vukicevic
a0b4b85e51 Bug 1179935, introduce complex viewport projections to Compositor, remove PrepareViewport; r=mstange
---
 gfx/layers/Compositor.h                          |  10 ---
 gfx/layers/basic/BasicCompositor.h               |   2 -
 gfx/layers/composite/TextureHost.h               |  34 +++++++-
 gfx/layers/d3d11/CompositorD3D11.cpp             |  47 +++++++---
 gfx/layers/d3d11/CompositorD3D11.h               |   4 +-
 gfx/layers/d3d9/CompositorD3D9.h                 |   2 +-
 gfx/layers/opengl/CompositingRenderTargetOGL.cpp |  23 +++--
 gfx/layers/opengl/CompositingRenderTargetOGL.h   |   2 +
 gfx/layers/opengl/CompositorOGL.cpp              | 104 +++++++++++++----------
 gfx/layers/opengl/CompositorOGL.h                |   6 +-
 10 files changed, 145 insertions(+), 89 deletions(-)
2015-05-19 13:51:26 -04:00
Vladimir Vukicevic
0827824d86 Bug 1179944, [webvr] put back support for Oculus 0.5.0 runtime, for OSX and Linux; r=mstange 2015-06-05 13:14:10 -04:00
Vladimir Vukicevic
cd29824fb8 Bug 1161670, cache D3D11 ShaderResourceView on TextureSourceD3D11; r=bas,jrmuizel 2015-05-05 14:35:29 -04:00
Bas Schouten
1a51d15b0f Bug 1176363 - Part 1: Stop using DrawTargets off the main thread. r=mattwoodrow 2015-07-27 15:47:29 +00:00
Ryan VanderMeulen
e107ea6a37 Backed out changeset adbd8a7608e4 (bug 1176363) for mochitest-gl permacrashes. 2015-07-27 13:54:56 -04:00
Bas Schouten
0bdd67bdd0 Bug 1176363 - Part 1: Stop using DrawTargets off the main thread. r=mattwoodrow 2015-07-27 15:47:29 +00:00
David Anderson
ba1e3c52d9 Move more compositor backend checks into gfxPlatform. (bug 1179051 part 4, r=mattwoodrow)
--HG--
extra : rebase_source : 887ed513fc50f2c1ee560ffa4a795b5c847154fe
2015-07-16 15:18:38 -07:00
Nicolas Silva
1669cfdfef Bug 1180688 - Detect whether the widget will be able to present frames with BasicCompositor on Mac. r=mstange 2015-07-13 16:46:48 +02:00
Lee Salzman
97d3a0fc71 Bug 1180246 - Part 1 - remove dependencies on gfxD2DSurface. r=bas
--HG--
extra : rebase_source : 199520a80f8d904f2034fa39d9640d271078a6ac
2015-07-02 08:02:51 -04:00
Nathan Froyd
974d8120f2 Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04:00
Matt Woodrow
3d198b14d2 Bug 1176570 - Make sure all shared texture handles are opened correctly before attempting to use them. r=jrmuizel 2015-06-26 14:07:57 -07:00
Mason Chang
af9e236e6e Bug 1176446 - TextureClientD3D11 should take into account the layer backend when allocating a surface. r=bas 2015-06-25 08:07:42 -07:00
Milan Sreckovic
ffec6a9914 Bug 1145143 - When we fail to UpdateRenderTarget, report the size as well. r=bas 2015-06-18 12:20:00 +02:00
Matt Woodrow
5925a945d1 Bug 1173983 - Use R8 textures for d3d11 alpha textures since it appears to be better supported. r=Bas 2015-06-15 12:30:34 -04:00
Andrew Comminos
1013161996 Bug 1167356 - Handle return value of DataSourceSurface::Map wherever possible. r=Bas
--HG--
extra : rebase_source : fe4fcb9c3a89e2573e6fde423ed8d96f31e00f14
2015-06-11 13:06:23 -04:00
David Major
eb73e64e7c Bug 1173107: Add hexa() around various hr logging. r=jrmuizel a=KWierso 2015-06-09 16:48:59 -04:00
Ryan VanderMeulen
e4040f9e04 Bug 1170143 - Fix Windows bustage to reopen a CLOSED TREE. 2015-06-05 11:31:16 -04:00
Nicolas Silva
e845d9219c Bug 1170143 - Add some error checks around the creation of dxgi ycbcr video frames. r=Bas 2015-06-05 16:19:11 +02:00
Amanda Sambath
376d6d03c3 Bug 1158120 - Replace nsIntSize by mozilla::gfx::IntSize in gfx/layers. r=nical 2015-06-03 13:45:24 +02:00
Milan Sreckovic
3a45f41851 Bug 1145143 - Check if buffer size is correct before calling the update. r=nical
--HG--
extra : rebase_source : 8bc66d9a332cb978a1b649f2f79a2501ecbc7bc6
2015-06-01 14:30:02 -04:00
Kearwood (Kip) Gilbert
e25ede39ea Bug 766345 - Part 1 - Implement DEAA Antialiasing for transformed layers (v5 Patch). r=vladimir, r=djg 2014-12-17 16:28:45 -08:00
Nathan Froyd
db188ea282 Bug 1160485 - remove implicit conversion from RefPtr<T> to TemporaryRef<T>; r=ehsan
Having this implicit conversion means that we can silently do extra
refcounting when it's completely unnecessary.  It's also an obstacle to
making RefPtr more nsRefPtr-like, so let's get rid of it.
2015-05-01 09:14:16 -04:00
Thibaud Backenstrass
5e604392a5 Bug 1158122 - Remove some occurences of nsIntRect in gfx/layers/. r=nical 2015-05-07 11:07:35 +02:00
Ethan Lin
b6a9cb595a Bug 1053563 - Use a static create function to replace InitWith for TextureClient. r=nical 2015-04-29 19:34:00 +02:00
Bas Schouten
f80640ea50 Bug 1116812 - Consider DXGI_ERROR_INVALID_CALL a recoverable error for IDXGISwapChain::GetBuffer. r=jrmuizel 2015-04-29 09:19:00 -04:00
Bas Schouten
7f7ef584ca Bug 1143806: Tolerate timeouts occurring if a device driver is in the process of resetting. r=jrmuizel 2015-04-24 17:09:42 +02:00
Kartikaya Gupta
cd5b55f8d6 Bug 1039866 - Rip out a bunch of metro-only code. r=jimm,gavin,rstrong 2015-04-23 15:10:30 -04:00
Andrea Marchesini
ade2831035 Bug 1156632 - Remove unused forward class declarations - patch 6 - the rest of the tree, r=ehsan 2015-04-22 08:29:24 +02:00
Nicolas Silva
cfff5e52c5 Bug 1155621 - Make nsIntRect and nsIntPoint typedefs of mozilla::gfx::IntRect and mozilla::gfx::IntPoint. r=Bas 2015-04-21 17:04:57 +02:00
Chris Pearce ext:(%2C%20Matt%20Woodrow%20%3Cmwoodrow%40mozilla.com%3E)
3916a66ac9 Bug 875247 - Add support for DXVA2 via D3D11. r=cpearce,gps,padenot 2015-03-31 18:21:15 +13:00
Nicolas Silva
e81603747c Bug 1142516 - Improve assertions and logging on the compositor side. r=Bas 2015-04-07 16:17:15 +02:00
Nicolas Silva
0b1f75bea0 Bug 1132854 - Remove the gfx::ToIntSize conversion helper. r=Bas 2015-04-07 16:08:57 +02:00
Vladimir Vukicevic
24157e2002 Bug 1148009; Add support for Cardboard (and other rotation-sensor based VR) in Firefox for Android; r=jrmuizel 2015-04-01 16:02:20 -04:00
Nicolas Silva
e3eaf89e3f Bug 1132854 - Make nsIntSize a typedef of gfx::IntSize. r=Bas, roc 2015-03-29 16:59:08 +02:00
Nicolas Silva
5ea6c11e06 Bug 1146912 - Finish replacing TextureHost::GetTextureSource by BindTextureSource. r=sotaro 2015-03-27 11:16:34 +01:00
Nicolas Silva
da6cace77d Bug 1147894 - Only use non-null compositors with TextureHost::SetCompositor. r=sotaro 2015-03-27 11:16:18 +01:00
Bas Schouten
64fec42b5d Bug 1147728: When using WARP, don't try to create a synchronization texture. This will fail on Windows 7. r=jrmuizel 2015-03-27 04:45:54 +01:00
Matt Woodrow
b47f624ddc Bug 1146313 - Null check pData in UpdateConstantBuffers. r=jrmuizel
--HG--
extra : rebase_source : 468e7af0dc2208962892610c4cf2f8033d39fc60
2015-03-26 13:06:21 +13:00
Matt Woodrow
439798a572 Bug 1146315 - Part 2: Release D3D11 YUV textures on the main thread. r=nical
--HG--
extra : rebase_source : 6d8d17dd02bb63a8ea0adcd94de891aad369d6dc
2015-03-26 13:05:25 +13:00
Matt Woodrow
abe801b442 Bug 1145585 - Hold a ref to the right texture. r=jmuizelaar
--HG--
extra : rebase_source : e000ff00ef1a25e040572a21775cfbf0efb32485
2015-03-26 12:57:03 +13:00
Matt Woodrow
28fe00ec0c Bug 1145513 - Upload YCbCr image data on the client side when using d3d9 layers. r=nical
--HG--
extra : rebase_source : be290c542566bc5650b45bfc2f892c8edf5fd14a
2015-03-23 15:13:56 +13:00
Jeff Muizelaar
33f4dd4b03 Bug 1144136. Remove unneeded Flush() from D3D11 compositor. r=bas
I don't think we need this because the Present() call has an implicit flush.

--HG--
extra : rebase_source : f82939a6c4a5ff9e962ec4d312dd1db9211085cd
2015-03-21 15:07:06 -04:00
Ehsan Akhgari
883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Matt Woodrow
67c8f780b6 Bug 1138967 - Part 3: Add D3D11 YCbCr texture clients and upload on the client side. r=nical
--HG--
extra : rebase_source : 90d0afdc61332b36032c8ccbf28294f77dd48a8b
2015-03-19 10:17:13 +13:00
Nicolas Silva
4609707f8e Bug 1142143 don't early return in TextureClientD3D11::Unlock if readback fails. r=jrmuizel 2015-03-11 18:35:35 +01:00
Milan Sreckovic
76dd5cd892 Bug 1140113 - Catch direct (and some indirect) callers of CreateDrawTarget* and deal with failure. r=mstange 2015-03-09 15:48:20 -04:00
Bas Schouten
4e7d60703f Bug 1131370: Try to ignore transient errors and increase D3D11 timeout as well. r=milan 2015-03-03 14:28:50 +01:00
Bas Schouten
42d9427fd6 Bug 1131370: Give content side more time to finish its copy. r=jrmuizel 2015-02-22 22:52:47 +00:00
Matt Woodrow
5ea802bd9a Bug 1128170 - Use UniquePtr for TextureClient KeepAlive objects to make sure we don't leak them. r=jrmuizel 2015-02-18 13:35:30 +13:00
Matt Woodrow
01eb91c854 Bug 1127925 - Lazily open shared handles in DXGITextureHostD3D11 to avoid holding references to textures that might not be used. r=jrmuizel 2015-02-13 14:23:43 +13:00
Bas Schouten
bb55e4e8ab Bug 1118322: Block explicitly for vblank when presenting when using WARP. r=jrmuizel 2015-02-09 16:35:48 +01:00
Jeff Muizelaar
cba312728d Bug 1124847. Fix apostrophe typos. 2015-01-30 00:12:01 -05:00
Jeff Muizelaar
f637b9c41a Bug 1124847. Track D3D11 shared texture usage in about:memory. r=bas
This will hopefully help us track down large amounts of write-combined
mappings that we see.

try: -b do -p win32,win64 -u all -t none

--HG--
extra : rebase_source : 612223046a34a0e7ba179fca4fef1d4c79e18ee8
2015-01-27 20:09:34 -05:00
Milan Sreckovic
5c1754eb7a Bug 1088833 - A bit of a clean up of warnings, and catch bad draw target in the d3d11 canvas case. r=bschouten 2015-01-20 12:47:29 -05:00
Bas Schouten
3b62ac5b76 Bug 1117925: Make sure to invalidate the entire window when the size changes. r=jrmuizel 2015-01-21 18:00:31 +01:00
Bas Schouten
4983028737 Bug 1119854: Crash when AcquireSync takes more than 10 seconds. r=jrmuizel 2015-01-10 04:50:02 +01:00
Bas Schouten
a5ebe274e9 Bug 1107718 - Addendum: Properly address review comments. r=nical 2015-01-08 00:12:29 +00:00
Bas Schouten
9ab9d86962 Bug 1107718: Properly deal with a D3D11 device reset. r=nical 2015-01-08 00:10:49 +00:00
Ryan VanderMeulen
20d7991ef8 Bug 1114577 - GFX cleanups now that Windows SDK 8.1 is the minimum supported version. r=jmuizelaar, r=glandium 2015-01-07 11:32:07 -05:00
Nicholas Nethercote
b4adaf93a3 Bug 1117639 - Remove AbortFrame() because it is dead. r=bas.
--HG--
extra : rebase_source : 7df4840fb99dc025ee102d9697097caa4034fa6d
2015-01-05 15:54:51 -08:00
Ethan Lin
945540c527 Bug 1042696 - Set allocator to TextureClient from constructor. r=nical 2014-12-22 03:49:00 -05:00
Milan Sreckovic
8445ba0749 Bug 1101685 - Optionally assert in loggers, default to true on gfxCriticalError. Clean up the calls where large texture sizes were triggering the asserts in tests. r=nical 2014-12-17 17:54:04 -05:00
Vladimir Vukicevic
18fcfec1c7 Bug 1036602 - Regenerate D3D11 shaders; r=Bas
From 11ab35cf793e6a2a0342b4e1a761a6f4cc394ff5 Mon Sep 17 00:00:00 2001
---
 gfx/layers/d3d11/CompositorD3D11Shaders.h   | 282 ++++++------
 gfx/layers/d3d11/CompositorD3D11ShadersVR.h | 638 ++++++++++++++++++++++++++++
 2 files changed, 786 insertions(+), 134 deletions(-)
 create mode 100644 gfx/layers/d3d11/CompositorD3D11ShadersVR.h
2014-07-09 12:28:05 -07:00
Vladimir Vukicevic
8cf3cb0f2d Bug 1036602 - Fix up D3D11 genshaders.sh script; r=bas
From 42aa031e5b36efe5603525c7967557fec7e09ec5 Mon Sep 17 00:00:00 2001
---
 gfx/layers/d3d11/genshaders.sh | 74 +++++++++++++++++++++++++-----------------
 1 file changed, 45 insertions(+), 29 deletions(-)
2014-07-09 12:27:38 -07:00
Vladimir Vukicevic
883e1dee4c Bug 1036602 - rename d3d11 .fx files to .hlsl; r=bas
From 0117494b71e0b9ea01d8b552523529cf305ab919 Mon Sep 17 00:00:00 2001
---
 gfx/layers/d3d11/CompositorD3D11.fx     | 279 --------------------------------
 gfx/layers/d3d11/CompositorD3D11.hlsl   | 279 ++++++++++++++++++++++++++++++++
 gfx/layers/d3d11/CompositorD3D11VR.fx   |  71 --------
 gfx/layers/d3d11/CompositorD3D11VR.hlsl |  71 ++++++++
 gfx/layers/d3d11/genshaders.sh          |  28 ++--
 5 files changed, 364 insertions(+), 364 deletions(-)
 delete mode 100644 gfx/layers/d3d11/CompositorD3D11.fx
 create mode 100644 gfx/layers/d3d11/CompositorD3D11.hlsl
 delete mode 100644 gfx/layers/d3d11/CompositorD3D11VR.fx
 create mode 100644 gfx/layers/d3d11/CompositorD3D11VR.hlsl
2014-12-17 11:47:06 -05:00
Vladimir Vukicevic
145ebfeec2 Bug 1036602 - add D3D11 support for VR rendering; r=bas
From fbb1e2ba9936896a1eb932585218401f4c95e411 Mon Sep 17 00:00:00 2001
---
 gfx/layers/d3d11/CompositorD3D11.cpp  | 212 +++++++++++++++++++++++++++++++++-
 gfx/layers/d3d11/CompositorD3D11.fx   |   1 +
 gfx/layers/d3d11/CompositorD3D11.h    |   9 ++
 gfx/layers/d3d11/CompositorD3D11VR.fx |  71 ++++++++++++
 4 files changed, 290 insertions(+), 3 deletions(-)
 create mode 100644 gfx/layers/d3d11/CompositorD3D11VR.fx
2014-07-09 12:26:51 -07:00
Jacek Caban
01dd5be8c8 Bug 1107297 - Crosscompilation fixup. 2014-12-14 14:36:11 +01:00
Bas Schouten
0618d254cc Bug 1088414: Use a single synchronization texture for D3D11. r=jrmuizel
This patch adds a cross platform 'sync object' that is used to synchronize the drawing of individual textures. For the D3D11 implementation all textures that are written to will have one pixel copied into the D3D11 sync texture while holding its lock. The compositor will then, before composition acquire and release sync once, this should ensure all drawing on the content side has completed.
2014-12-13 01:50:47 +00:00
Wes Kocher
c38e376cd3 Backed out changeset 2cd43e5ae2c1 (bug 1088414) for breaking non-Windows builds on a CLOSED TREE 2014-12-12 18:11:59 -08:00
Bas Schouten
b339c72f57 Bug 1088414: Use a single synchronization texture for D3D11. r=jrmuizel
This patch adds a cross platform 'sync object' that is used to synchronize the drawing of individual textures. For the D3D11 implementation all textures that are written to will have one pixel copied into the D3D11 sync texture while holding its lock. The compositor will then, before composition acquire and release sync once, this should ensure all drawing on the content side has completed.
2014-12-13 01:50:47 +00:00
Bas Schouten
184e84297b Bug 1107297: Only recomposite the damaged rect with D3D11. r=jrmuizel
This patch makes us behave similarly to when we're using the BasicCompositor, essentially we will clip all drawing to the final display to the area that was labeled as invalid. When DXGI 1.2 is available we will then also report the damaged area to the Present call so that can then be used to minimize the amount of bits that actually need to be blitted to the screen. Since we're no longer recompositing the whole screen this means we should also only clear the damaged area of the window.
2014-12-06 00:02:18 +00:00
Nicolas Silva
09a19cc46c Bug 1104008 - Make sure the D3D11 swapchain's textures are cleared before resizing. r=Bas. 2014-12-02 14:28:19 +01:00
Nicolas Silva
01dc7cd769 Bug 1086670 - Add more gfxCriticalError logging in the D2D backend. r=jrmuizel 2014-11-26 21:05:01 +01:00
Benoit Girard
d5c0f44e8b Bug 1101650 - Fix mClearOnBind logic. r=jmuizel 2014-11-19 15:29:23 -05:00
Milan Sreckovic
d19b0d26a2 Bug 1074952 - Part 6. Fully qualify the appropriate logs in the logging macros, otherwise we can't call these from other namespaces. An example in non-gfx/2d where it would not have worked without this change. r=botond 2014-11-18 10:51:39 -05:00
Jeff Muizelaar
ab7985df99 Bug 1101160. D3D11: Make switch statement better. r=bas
This is the order one would expect.

--HG--
extra : rebase_source : 299b3814983d42908c2507028bb1c16c64b0f25f
2014-11-18 15:49:39 -05:00
Benoit Girard
f654866a36 Bug 1087530 - Retain container's intermediate surfaces for up to one frame. r=jmuizelaar 2014-11-03 17:27:32 -05:00
Jeff Muizelaar
ad91c2690e Bug 1088414. Backout "Use a single synchronized texture for d3d11"
https://hg.mozilla.org/mozilla-central/rev/e2efedec2d60
2014-11-17 14:20:05 -05:00
Matt Woodrow
3a89ba9be0 Bug 1088414. Use a single synchronized texture for d3d11. r=bas,f=jrmuizel
Calling AcquireSync on textures created with
D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX appears to be really slow, this really
bites us with the number of textures involved when tiling.

I've also tested using ID3D11Query to check when work is completed, this also
appears to be pretty slow.

This instead just uses a single texture with a keyedmutex, and makes sure we
draw to it last and lock it first. It's pretty hacky, but seems to work really
well so far.

--HG--
extra : rebase_source : bf5f56751f993e507fcd1e5c386fb1fc9a3f73af
2014-10-22 15:37:00 +13:00
Carsten "Tomcat" Book
7f42025e12 Backed out changeset 48667a14f94d (bug 1092360) for test bustage / crashes on a CLOSED TREE 2014-11-14 08:14:22 +01:00
Benoit Girard
db4fbee6fb Bug 1092360 - Avoid redundant framebuffer switches. r=jrmuizel 2014-11-12 17:39:17 -05:00
Jeff Muizelaar
e6fbe0d1fc Bug 1089364. Avoid trying to resize the swap chain to a negative size. r=bas
This was causing GetBuffer to return DXGI_ERROR_INVALID_CALL

--HG--
extra : rebase_source : 49e62fd5dda1e28268218cffca4ea1ce7af1b6ea
2014-11-13 10:10:48 -05:00
Jacek Caban
1fb284960f Bug 1092130 - Fixed build errors found by mingw after bug 1076698 landed (-Werror=missing-braces errors). r=cpearce 2014-11-03 10:28:52 +01:00
Bas Schouten
9d622e3111 Bug 1064864. Ensure the copying bounds are sane. r=jrmuizel
This prevents things from going really bad on some drivers.

--HG--
extra : rebase_source : c237cf3e6a6174696ebe6d41562a30c8cc0e564d
2014-11-01 14:02:20 -04:00
Nicolas Silva
816b042dd6 Bug 1089364 - Add some missing D3D11 error checks. r=Bas 2014-10-27 13:52:17 +01:00
Jeff Gilbert
f71b4f41d9 Bug 1088417 - Switch from REPEAT to CLAMP for D3D11. - r=nical 2014-10-23 17:10:58 -07:00
Jeff Gilbert
44490638fd Bug 1088417 - DecomposeIntoNoRepeatRects for D3D11. - r=nical 2014-10-23 17:08:06 -07:00
Nicolas Silva
92db98b094 Bug 1087270 - Check more D3D11 result codes and assert in debug builds. r=jrmuizel 2014-10-23 16:22:41 +02:00
Carsten "Tomcat" Book
8e79075d89 Backed out changeset 8a39622aa24a (bug 1087270) for bustage 2014-10-23 13:12:16 +02:00
Nicolas Silva
340b8a427e Bug 1087270 - Check more D3D11 result codes and assert in debug builds. r=jrmuizel 2014-10-23 12:06:14 +02:00
jdashg
9b7291ca7a Bug 1066280 - Remove SurfaceStream. - r=kamidphish,mattwoodrow 2014-10-07 21:15:39 -07:00
Nicolas Silva
f26be8e3fa Bug 1077307 - Merge NewTextureSource and TextureSource. r=sotaro 2014-10-07 15:58:59 +02:00
Nicolas Silva
a735b7135f Bug 1044975 - Don't crash if mapping D3D11 shader constant buffers fails. r=Bas 2014-10-06 14:53:42 +02:00
Nicolas Silva
1d3f0255c9 Bug 1061713 - Don't crash release builds if a D3D TextureClient is unlocked without being locked. r=Bas 2014-09-29 11:24:54 +02:00
Nicolas Silva
24ab6f3545 Bug 1054581 - Have all compositor backends behave consistently when creating a zero-sized intermediate render target. r=jrmuizel 2014-09-26 15:02:35 -04:00
Markus Stange
7d5a3be591 Bug 1073103 - Rename ThebesLayer to PaintedLayer. r=roc
--HG--
rename : gfx/layers/basic/BasicThebesLayer.cpp => gfx/layers/basic/BasicPaintedLayer.cpp
rename : gfx/layers/basic/BasicThebesLayer.h => gfx/layers/basic/BasicPaintedLayer.h
rename : gfx/layers/client/ClientThebesLayer.cpp => gfx/layers/client/ClientPaintedLayer.cpp
rename : gfx/layers/client/ClientThebesLayer.h => gfx/layers/client/ClientPaintedLayer.h
rename : gfx/layers/client/ClientTiledThebesLayer.cpp => gfx/layers/client/ClientTiledPaintedLayer.cpp
rename : gfx/layers/client/ClientTiledThebesLayer.h => gfx/layers/client/ClientTiledPaintedLayer.h
rename : gfx/layers/composite/ThebesLayerComposite.cpp => gfx/layers/composite/PaintedLayerComposite.cpp
rename : gfx/layers/composite/ThebesLayerComposite.h => gfx/layers/composite/PaintedLayerComposite.h
rename : gfx/layers/d3d10/ThebesLayerD3D10.cpp => gfx/layers/d3d10/PaintedLayerD3D10.cpp
rename : gfx/layers/d3d10/ThebesLayerD3D10.h => gfx/layers/d3d10/PaintedLayerD3D10.h
rename : gfx/layers/d3d9/ThebesLayerD3D9.cpp => gfx/layers/d3d9/PaintedLayerD3D9.cpp
rename : gfx/layers/d3d9/ThebesLayerD3D9.h => gfx/layers/d3d9/PaintedLayerD3D9.h
2014-09-26 13:06:08 -04:00
Nicolas Silva
a318a426b4 Bug 1070018 - Log HRESULT error codes as hexadecimal values rather than signed integers. r=Bas 2014-09-23 11:35:39 -04:00
Bas Schouten
8e86fc0d5c Bug 1068613 - Addendum: Fix bustage in ASAN builds. r=bustage on a CLOSED TREE 2014-09-18 00:25:23 +02:00
Nicolas Silva
fbfe674e91 Bug 1068613 - Part 3: Log failures in D2D, D2D 1.1 and the D3D11 TextureClient. r=bas 2014-09-17 23:23:09 +02:00
Nicolas Silva
2d36152b7a Bug 1061699 - Only crash debug builds if BorrowDrawTarget is called on an unlocked TextureClient. r=Bas 2014-09-16 14:32:24 +02:00
Bas Schouten
8e9803a615 Bug 1066138: Disable using TextureClientD3D11 for A8 surfaces and fix various TextureClientD3D11 A8 bugs. r=jrmuizel 2014-09-14 23:51:31 +02:00
Matt Woodrow
b1adcf8934 Bug 1046550 - Part 3: Use Direct2D 1.1 when preffed on. r=bas 2014-09-14 23:51:27 +02:00
Jeff Muizelaar
34032eed5e Bug 1064479. Redo how screen rotation is implemented on B2G/Layers. r=nical,mwoodrow
Currently we use a world transform on the LayerManager. This gets passed to the
screen render target which adjusts the gl transform to accomplish the rotation.
This causes a lot of the system to have to know about the transform.

Instead we can just bake the transform into the root layer's shadow transform.
Everything now mostly just works.

--HG--
extra : rebase_source : e0e170d191eef5887a2e6b17f71ac79037033006
2014-09-10 15:59:00 -04:00
Jonathan Watt
423fda249a Bug 1065031, part 2 - Changes to Moz2D consuming code to update callers of Moz2D Matrix's Translate, Scale and Rotate methods to use these methods' new names. r=Bas 2014-09-10 18:29:35 +01:00
Jonathan Watt
62cd61e1b7 Bug 1065127 - Avoid Matrix().Translate()/Scale()/Rotate() multiplication in lots of places. r=Bas 2014-09-10 14:26:12 +01:00
Carsten "Tomcat" Book
31ab875e26 Backed out changeset e6b766d8a815 (bug 1065127) for bustage 2014-09-10 14:30:36 +02:00
Jonathan Watt
ee916d4351 Bug 1065127 - Avoid Matrix().Translate()/Scale()/Rotate() multiplication in lots of places. r=Bas
--HG--
extra : rebase_source : ef075258c31973c4943b9b3a9229685a9bb83917
2014-09-10 11:45:42 +01:00
Jeff Gilbert
638c79d7ac Bug 1052234 - Allow RGBA-order D3D11 TextureHosts. - r=bas 2014-08-30 16:27:32 -07:00
Jeff Muizelaar
c7028a4f92 Bug 1057716. d3d11: Properly copy the background. r=bas
Previously we were copying an empty box.
2014-08-26 14:33:03 -04:00
Jacek Caban
956b4238da Bug 1055664 - Use static instead of fiend function for StartTaskThread. r=bas.schouten 2014-08-26 13:50:38 +02:00
Nicolas Silva
a10d917743 Bug 1047765 - Pass the proper allocation flags in TextureClient::CreateSimilar. r=Bas 2014-08-06 14:40:07 +02:00
Ehsan Akhgari
30e3b3975d Bug 1047614 - Give ReadbackManagerD3D11 a private destructor; r=jrmuizel 2014-08-05 17:57:24 -04:00
Bas Schouten
6624d1aefe Bug 947781 - Part 2: Add the ability to readback texture data to TextureClient. r=nical 2014-07-30 15:38:46 +02:00
Ed Morley
46d9238c0a Backed out changeset c4ecea1452e9 (bug 947781) 2014-07-30 14:54:08 +01:00
Bas Schouten
7dae46766a Bug 947781 - Part 2: Add the ability to readback texture data to TextureClient. r=nical 2014-07-30 15:38:46 +02:00
Nicolas Silva
37027d1278 Bug 1043929 - Ensure that a locked TextureHost can give access to a valid TextureSource for some of the texture types. r=Bas 2014-07-28 14:58:38 +02:00
Nicolas Silva
afef7c0a5e Bug 1042052 - Add TextureClient::CreateSimilar and have component alpha buffer be of the same type. r=sotaro 2014-07-25 11:24:46 +02:00
Nicolas Silva
75420bc281 Bug 1015718 - Don't crash creating a TextureHost if there is no device or if deserialization failed. fixing test failure on a CLOSED TREE 2014-07-23 20:17:15 +02:00
Nicolas Silva
cc62acd996 Bug 1015718 - Keep the client-side D3D11 texture alive longer so that its destruction does not race with its deserialization. r=bas 2014-07-22 17:49:05 +02:00
Matt Woodrow
024807715d Bug 1015718 - Deserialize the DXGI handle when constructing the TextureHost rather than when locking it. r=nical 2014-07-16 18:05:58 +12:00