src/libANGLE/Surface.cpp


Log

Author Commit Date CI Message
John Bauman fe3e46ab 2015-11-24T19:13:55 Add EGL_ANGLE_flexible_surface_compatibility This extension allows users of ANGLE to make contexts current with surfaces that were created with different bit depths. BUG=angleproject:1223 Change-Id: I9072c256e0a36aee1ce41ab69cb9a04240bf0521 Reviewed-on: https://chromium-review.googlesource.com/314935 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: John Bauman <jbauman@chromium.org> Tested-by: John Bauman <jbauman@chromium.org>
Geoff Lang 1b3979b9 2015-12-08T11:39:24 Pass the gl::Texture object into Surface::bindTexImage. BUG=540829 Change-Id: Iee602165e69bfe574821c6f628a745c32932a938 Reviewed-on: https://chromium-review.googlesource.com/316800 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 6b120b9f 2015-11-24T13:00:07 Add checks for FBO attachment layer. We would allow the app to attach layers that were out-of-bounds. Fix this by checking against the underlying resource dimensions. Also rework the code a bit to clean up the texture size query, which is available from the ImageDesc. BUG=angleproject:869 Change-Id: I984f1db16daea6ca650d795884d8ec2cb8f05ebb Reviewed-on: https://chromium-review.googlesource.com/313991 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 47a878c6 2015-08-25T12:28:29 Surface: do not leak the default framebuffer Due to the many merges and changes to 37c3979e47bf93958b426aaa31c1d65aef881b5f the default framebuffer deletion "disappeared". Add it back to the destructor of Surface. Update Surface_unittests and remove one of the two tests as they were equivalent. BUG=524495 BUG=angleproject:1137 Change-Id: I1309285ea00976ae2685628ea3f92731a9259718 Reviewed-on: https://chromium-review.googlesource.com/295153 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 37c3979e 2015-08-20T14:19:46 Revert "Revert "Make the default framebuffer owned by Surface"" Reland the commit after fixing a bug in FramebufferAttachment. This reverts commit 18fdcbcf1d02d3b3b4b5c712f05058f2e8d629c6. BUG=angleproject:891 Change-Id: I07e08de52bfce8d84d070fc7bc15883009298a4d Reviewed-on: https://chromium-review.googlesource.com/294831 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 18fdcbcf 2015-08-19T18:12:44 Revert "Make the default framebuffer owned by Surface" Seems to be causing failures on the Mac GPU FYI bots. SurfaceTest.DestructionDeletesImpl seems to crash. BUG=angleproject:891 BUG=522557 This reverts commit 264ab56f2e70431e8310f9353952acd3b22b466f. Change-Id: I80aeecb8e191de011d9afe6534d0285dcffa82a3 Reviewed-on: https://chromium-review.googlesource.com/294540 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 264ab56f 2015-08-12T12:39:52 Make the default framebuffer owned by Surface Reland with a fix for SurfaceTest in angle_unittests and fixes for signed-unsigned warnings In CGL there is no notion of default Framebuffer and MakeCurrent only makes a context current but not a drawable. Instead, everything is done via render to texture. For that reason, different surfaces will have different FBOs as default framebuffers, which causes that change. BUG=angleproject:891 Change-Id: I0664896bc335b1a757226aaa212536b8f9d0f08f Reviewed-on: https://chromium-review.googlesource.com/293752 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 11cd6af6 2015-08-18T15:54:01 Revert "Make the default framebuffer owned by Surface" Compilation warning on Windows This reverts commit 6cb2ae8292e69aa110c89e0465366b9f049c1168. Change-Id: I4ecadf5d8e909f986da186a7326cfa0922ae8710 Reviewed-on: https://chromium-review.googlesource.com/294241 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 6cb2ae82 2015-08-12T12:39:52 Make the default framebuffer owned by Surface Reland with a fix for SurfaceTest in angle_unittests and fixes for signed-unsigned warnings In CGL there is no notion of default Framebuffer and MakeCurrent only makes a context current but not a drawable. Instead, everything is done via render to texture. For that reason, different surfaces will have different FBOs as default framebuffers, which causes that change. BUG=angleproject:891 Change-Id: Ie9a72de01a58e583a1bfa3f4a055debb860b912f Reviewed-on: https://chromium-review.googlesource.com/293713 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 51706eae 2015-08-07T14:39:22 Make FramebufferAttachmentObject not refcountable Re-land with a fix for an unitialized variable Instead the refcount is done via callbacks. This allows Surface to ignore this refcounting which will be useful in a follow-up CL. BUG=angleproject:891 Change-Id: I1925ccaa4ce7b502b33088660d31c404b8313cb5 Reviewed-on: https://chromium-review.googlesource.com/293712 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Cooper Partin 4d61f7ed 2015-08-12T10:56:50 Reland Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data' Additional warnings found with more testing and added C4267 warning disable only for angle_libpng BUG=angleproject:1120 Change-Id: Ic403dcff5a8018056fa51a8c408e64207f3362eb Reviewed-on: https://chromium-review.googlesource.com/293028 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 0020426e 2015-08-12T19:07:29 Revert "Make FramebufferAttachmentObject not refcountable" BUG= This reverts commit 19ba57469aa02074d094a9aef104f84d0b6d881e. Change-Id: I5dce6c8a81570e22affbcaf32183a97c97849718 Reviewed-on: https://chromium-review.googlesource.com/293351 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 1bf40bfe 2015-08-12T15:52:04 Revert "Make the default framebuffer owned by Surface" This reverts commit 87e63a9982803b5e4c12afa9a40ff0e2b04a7369. Speculative revert to fix the webgl cts on Windows D3D9 and the unittests on Linux. BUG= Change-Id: I488f4e0b2dc67270eed45f1c10bfba1d13c98739 Reviewed-on: https://chromium-review.googlesource.com/293350 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 87e63a99 2015-08-12T12:39:52 Make the default framebuffer owned by Surface In CGL there is no notion of default Framebuffer and MakeCurrent only makes a context current but not a drawable. Instead, everything is done via render to texture. For that reason, different surfaces will have different FBOs as default framebuffers, which causes that change. BUG=angleproject:891 Change-Id: I3f6da7b587353316026ea39a5c87f91265e0f1ba Reviewed-on: https://chromium-review.googlesource.com/289872 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 19ba5746 2015-08-07T14:39:22 Make FramebufferAttachmentObject not refcountable Instead the refcount is done via callbacks. This allows Surface to ignore this refcounting which will be useful in a follow-up CL. BUG=angleproject:891 Change-Id: I39b028476e0e3ab1837c033e1121ea21e54d7970 Reviewed-on: https://chromium-review.googlesource.com/291651 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill b195643c 2015-08-12T17:35:20 Revert "Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data'" Seems to have quite a few warnings in 64-bit on my machine. BUG=angleproject:1120 This reverts commit c5cf9bc47d0ee028adbbf9e9f94ca567eec601dc. Change-Id: I86768b900aeba52e7a2242d9ae8949f93f1a5ba9 Reviewed-on: https://chromium-review.googlesource.com/293280 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin c5cf9bc4 2015-08-06T10:46:48 Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data' BUG=angleproject:1120 Change-Id: I01ef10bea7f487c2b394d030c76628f38d2ea645 Reviewed-on: https://chromium-review.googlesource.com/292780 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 5d65cd56 2015-07-30T09:47:39 Surface: query swapBehavior from the Impl All the previously implemented surfaces used to preserve the content of the surface on a swap but this is no longer the case with CGL. BUG=angleproject:891 Change-Id: I264c579bcbbd22b4eeb09e78aa95751d223694fc Reviewed-on: https://chromium-review.googlesource.com/289871 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill bb714f72 2015-05-20T10:22:18 Release egl::Surface on Texture image changes. We would get into a broken state if the user would bind a Texture to an egl::Surface, then change the Texture. This is valid in egl, and should release the Surface when it happens. BUG=485543 Change-Id: Idfaa305ac704f2bc579e79be816e88a23e69351b Reviewed-on: https://chromium-review.googlesource.com/271986 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8cf813c7 2015-05-04T12:55:18 Query attachment render targets from Impl class. *re-land with fix for D3D9* This allows us to eradicate the GetAttachmentRenderTarget methods. This improves potential performance, at the cost of exposing a Renderer-specific function at the API object level. BUG=angleproject:963 Change-Id: Iee9f985ddaed668df0c622228004b348eb4d2ea8 Reviewed-on: https://chromium-review.googlesource.com/269006 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e737b06c 2015-05-04T16:53:56 Revert "Query attachment render targets from Impl class." D3D9 bug is causing failures in the WebGL depth texture test. BUG=angleproject:963 This reverts commit 804e8436f91733e1d0f769ec10082e4741f2e549. Change-Id: I660f05033360e97258794138cb50b604f5ac16b6 Reviewed-on: https://chromium-review.googlesource.com/269005 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 804e8436 2015-04-30T09:42:23 Query attachment render targets from Impl class. This allows us to eradicate the GetAttachmentRenderTarget methods. This improves potential performance, at the cost of exposing a Renderer-specific function at the API object level. BUG=angleproject:963 Change-Id: Ifc227b5f42e87bd4deb451d685618cf61fea39f1 Reviewed-on: https://chromium-review.googlesource.com/263491 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 79481d65 2015-04-14T08:13:47 Add FramebufferAttachmentObject base class. This lets us share objects (Textures/RBs/Surface) in the attachment class. It will let us squash the attachment classes into one type, which will in turn let us store them by-value, instead of by-pointer. BUG=angleproject:963 Change-Id: Ia9a43dbc3b99475c00f6bc2ed5475deef55addc3 Reviewed-on: https://chromium-review.googlesource.com/263487 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 0305320f 2015-04-09T11:21:13 WGL Pbuffer implementation. BUG:angleproject:890 Change-Id: Id6e04117ddf7bde3ffb0d9e4cef6db3d07039a54 Reviewed-on: https://chromium-review.googlesource.com/261410 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill c30c424f 2015-04-01T14:17:07 Make egl::Surface ref-counted. This will let us store references to Surface in FBO attachments, even after the surface is destroyed. BUG=angleproject:963 Change-Id: I7e1cb161d1e08f78b1c4d730a32ad09ac7e61e30 Reviewed-on: https://chromium-review.googlesource.com/263482 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1aca922a 2015-03-19T12:02:50 Track more information at the egl::Surface level. Many of the members of SurfaceImpl could be stored in egl::Surface instead. This makes SurfaceImpl a pure interface and makes Surface constructors much simpler. BUG=angleproject:795 Change-Id: Ifa797b4bef84afe66f9fb3f3a6be260f726ca55c Reviewed-on: https://chromium-review.googlesource.com/261358 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9d3ae5fe 2015-03-18T17:20:33 Use the Surface type for validation and fix incorrect window validation. The window passed to surface creation should not be used by any surface owned by any display, not just the current one. Store a global window surface list for validation. BUG=angleproject:795 Change-Id: I2314979f2f27848b21fcb00676194d7671d1db68 Reviewed-on: https://chromium-review.googlesource.com/260942 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4b91262a 2015-03-18T17:17:59 Pass the Surface type, config and attributes to the constructor. BUG=angleproject:795 Change-Id: I15e7f2f51ecc243edf83d9a9544eba137d8bb599 Reviewed-on: https://chromium-review.googlesource.com/260941 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f6bf23fd 2015-01-20T11:43:54 Split up the Display::create*Surface and have them match the API. BUG=angle:658 Change-Id: Id0054406a5ce6f6ffef28ce84737547c1869efde Reviewed-on: https://chromium-review.googlesource.com/242038 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c223dc6b 2015-01-09T13:10:01 Change Config to a struct and rename it's members. BUG=angle:658 Change-Id: I18dab915730fc28815db8080b3614da821f9c8b1 Reviewed-on: https://chromium-review.googlesource.com/239901 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang b9266276 2015-01-29T13:25:14 Update texture size information on egl[Bind|Release]TexImage. BUG=450257 Change-Id: I7609131d78f255bf9f79b42f39b02303a5c14b60 Reviewed-on: https://chromium-review.googlesource.com/243915 Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang b931e721 2014-12-11T13:49:13 Check for EGL extension existance during validation. BUG=angle:658 Change-Id: I078d7f9ab4ab42bd7d3cd3865572ead8ed1f0b29 Reviewed-on: https://chromium-review.googlesource.com/234763 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7c973eaa 2014-12-19T15:58:28 Move egl texture binding to the base texture class. It's still only valid to bind a 2D texture but the validation layer verifies that. BUG=angle:681 Change-Id: I744dc32f9bd0f69b1e1235b8feef7e796167d033 Reviewed-on: https://chromium-review.googlesource.com/236931 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill fb0580a6 2014-11-27T14:03:52 MANGLE egl::Surface. This class has its fingers in a lot of other classes. In particular, we will likely need to revisit the context lost handling methods when we implement the robustness extensions on top of desktop GL. For now, we can leave them tied pretty tightly to the D3D implementation. BUG=angle:795 Change-Id: I9b3ac90dfd393f52c5b49bc2bd6b97fb5536ed91 Reviewed-on: https://chromium-review.googlesource.com/228916 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1c9ecfd7 2014-11-25T11:50:58 Add querySurfacePointerANGLE method to Surface. This method will more closely match the desktop GL implementation. BUG=angle:795 Change-Id: I796b46bb6e8e895dad8d9824e8405edcc12e8a4f Reviewed-on: https://chromium-review.googlesource.com/228915 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2207213b 2014-11-20T15:15:01 Move as many files as possible from common to libANGLE. BUG=angle:733 Change-Id: If01c91cd52ac5c2102276a9fdc4b68ebc13e47f9 Reviewed-on: https://chromium-review.googlesource.com/231850 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5ce48e21 2014-11-24T11:38:54 Use EGLClientBuffer in place of HANDLE in EGL. BUG=angle:795 Change-Id: I7af47e9306e0e12b980cfd3f061bbbe0951ac4e4 Reviewed-on: https://chromium-review.googlesource.com/228913 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4349ab85 2014-11-25T15:53:34 Revert "Move as many files as possible from common to libANGLE." Chromium directly includes our common/version.h and couldn't build after this change. This reverts commit f0a2c7727f9863c38a435a16a69d513c481fbbdd. Change-Id: Iafc41b1a3973f609518fe3588fdb64cecc285332 Reviewed-on: https://chromium-review.googlesource.com/231840 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f0a2c772 2014-11-20T15:15:01 Move as many files as possible from common to libANGLE. BUG=angle:733 Change-Id: I40cee6e2e305ac493acbc8649f858785c0569aed Reviewed-on: https://chromium-review.googlesource.com/231051 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4c76feac 2014-11-24T11:38:52 Remove notify parameter from testDeviceLost. We can get rid of this parameter now that we call notify directly on the display in cases where we need to. BUG=angle:795 Change-Id: I2024b70d0d725e755f7aa742ba221c2d0179d8b6 Reviewed-on: https://chromium-review.googlesource.com/228911 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2b5420c0 2014-11-19T14:20:15 Merge libGLESv2 and libEGL classes into libANGLE. BUG=angle:733 Change-Id: Ic491c971411fe82c56cd97c5c8325ac14ec218df Reviewed-on: https://chromium-review.googlesource.com/230830 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>