Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Go to file
Jamie Nicol 2e495f6789 Bug 1731980 - Ensure SurfaceTextures with transforms get rendered at correct size. r=gfx-reviewers,lsalzman
On Android we use SurfaceTextures to render content from sources such
as the video decoder. These may have a transform set which is supposed
to be applied to the texture coordinates used to sample the
texture. Webrender (and software webrender), however, do not handle
this correctly, meaning videos may be rendered at the incorrect size
on some devices.

SurfaceTextures should always be rendered with their bottom-left being
their origin, eg vertically flipped. Additionally, the texture
transform returned on most devices seems to be a simple y-flip
transform with no scaling. Webrender currently just ignores the y-flip
due to the texture origin, which cancels out us not handling the
y-flip from the transform, meaning video looks correct on most
devices. Some devices, however, do return a scaling transform which we
must handle.

This patch removes the override of WebRenderTextureHost::NeedsYFlip()
that was causing us to ignore the y-flip due to the texture origin -
since we will now apply the transform we must handle this correctly
too.

It adds a virtual method RenderTextureHost::GetUvCoords(), that
returns the texture coordinates that should be used by webrender to
sample from external textures. In most cases these are simply (0, 0)
and (size.x, size.y), but in RenderAndroidSurfaceTextureHost we
override this function to apply the transformation. This ensures we
use the correct coordinates whenever the texture is rendered by
webrender, eg in both software and hardware webrender when rendering
in the non-compositing-path, and by hardware webrender's draw
compositor. Additionally, the composite.glsl shader requires a fix to
calculate the UV bounds correctly, as the coordinates may now be
inverted.

Lastly, we fix software webrender with the OpenGL
compositor. CompositorOGL already has the required functionality to
apply the texture transformation as it was used back in the layers
days. We must simply ensure that we pass the value of the
mIgnoreTransform flag from the original SurfaceTextureHost, through to
the RenderAndroidSurfaceTextureHost, and finally to the
SurfaceTextureSource which we hand to CompositorOGL.

Differential Revision: https://phabricator.services.mozilla.com/D144306
2022-04-25 16:47:51 +00:00
.cargo Bug 1765969 - Update cubeb-coreaudio-rs to 44eca958. r=cubeb-reviewers,chunmin 2022-04-22 15:54:12 +00:00
.vscode
accessible Bug 1395181 part 2: Support click handlers added to the root element. r=eeejay 2022-04-22 23:13:36 +00:00
browser Bug 1740792 - Replace TODO with explanatory comment r=rpl DONTBUILD 2022-04-25 15:51:58 +00:00
build Bug 1764153 - land NSS NSS_3_78_BETA1 UPGRADE_NSS_RELEASE, r=nss-reviewers,bbeurdouche 2022-04-22 12:42:27 +00:00
caps Bug 1761511 - Part 5: Fix gtest deprecation warnings, r=ahal 2022-04-14 02:09:22 +00:00
chrome Bug 1763000 - Fix ESLint rule warnings for no-unused-vars in caps/tests/unit/test_no_remote_registration.js. r=Standard8 2022-04-05 20:39:36 +00:00
config Bug 1660745 - Update encoding_rs to 0.8.31 and packed_simd to 0.3.7. r=hsivonen 2022-04-20 06:24:28 +00:00
devtools Backed out 2 changesets (bug 1762865, bug 1764055) for causing devtools failures on browser_dbg-features-breakable-lines.js. CLOSED TREE 2022-04-25 15:44:02 +03:00
docs Bug 1749795 - create documentation for adding and testing site-specific wrappers. r=mhowell 2022-04-22 20:46:11 +00:00
docshell Bug 1735746 - Block external protocol navigation from sandboxed contexts. r=nika,ckerschb,Gijs,smaug 2022-04-20 11:06:50 +00:00
dom Bug 1765894 - Make WebMIDI early-beta-or-earlier. r=gsvelto 2022-04-25 15:40:27 +00:00
editor Bug 1758420 - part 2: Clean up update timing of TextComposition r=m_kato 2022-04-21 03:37:56 +00:00
extensions Bug 1765113. Silence spammy warning in extensions/permissions/PermissionDelegateHandler.cpp. r=timhuang 2022-04-19 09:49:50 +00:00
gfx Bug 1731980 - Ensure SurfaceTextures with transforms get rendered at correct size. r=gfx-reviewers,lsalzman 2022-04-25 16:47:51 +00:00
gradle/wrapper Bug 1724480 - Upgrade JDK to Java 17. r=glandium,ahal,calu 2022-01-11 19:16:01 +00:00
hal Bug 1760839 - Use more automatic memory management in GTK code. r=stransky 2022-03-23 16:14:34 +00:00
image Bug 1765116. Don't ignore any potential invalidation rect from calling UpdateState in FrameAnimator::ResetAnimation. r=aosmond 2022-04-22 09:00:42 +00:00
intl Bug 1766220: Backport ICU-21994 to fix a potential heap buffer overflow. r=platform-i18n-reviewers,dminor 2022-04-25 16:34:42 +00:00
ipc Backed out 17 changesets (bug 1752332) for causing crashes at JS::AutoAssertNoGC::AutoAssertNoGC(JSContext*). CLOSED TREE 2022-04-25 17:55:17 +03:00
js Bug 1766225: Save volatile output register before calling post-write barrier. r=jandem 2022-04-25 16:34:03 +00:00
layout Bug 1654054 - Port videocontrols to Fluent. r=mconley,fluent-reviewers,pip-reviewers,flod 2022-04-25 14:21:18 +00:00
media Bug 1763991: Re-orient patches to align with mach vendor r=bryce 2022-04-20 16:18:24 +00:00
memory Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw 2022-03-16 18:47:08 +00:00
mfbt Bug 1440727 - Disallow extra data at the end of serialized data buffer r=decoder,jonco 2022-04-22 03:08:47 +00:00
mobile Bug 1764157 - Make showPicker() for date/time/etc work on Android. r=agi 2022-04-23 10:23:16 +00:00
modules Bug 1765894 - Make WebMIDI early-beta-or-earlier. r=gsvelto 2022-04-25 15:40:27 +00:00
mozglue Backed out changeset 192cc007fef6 (bug 1742864) for xpcshell failure on test_dmd.js 2022-04-22 18:01:14 +03:00
netwerk Backed out 17 changesets (bug 1752332) for causing crashes at JS::AutoAssertNoGC::AutoAssertNoGC(JSContext*). CLOSED TREE 2022-04-25 17:55:17 +03:00
nsprpub Bug 1743566 - Finalize NSPR version number (no code change). r=glandium UPGRADE_NSPR_RELEASE DONTBUILD 2021-12-18 01:13:20 +00:00
other-licenses
parser Backed out changeset aa30bc1b369b (bug 1763076) for causing assertion failure in parser/html/nsHtml5TreeOpExecutor.cpp CLOSED TREE 2022-04-19 14:41:03 +03:00
python Bug 1654054 - Fluent migration for videocontrols. r=fluent-reviewers,mconley,flod 2022-04-25 14:21:18 +00:00
remote Bug 1666456 - [remote] added tests to Assert.positiveNumber. r=whimboo,jdescottes,webdriver-reviewers 2022-04-22 08:15:49 +00:00
security Bug 1764153 - land NSS NSS_3_78_BETA1 UPGRADE_NSS_RELEASE, r=nss-reviewers,bbeurdouche 2022-04-22 12:42:27 +00:00
services No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=diannaS 2022-04-21 11:42:29 +00:00
servo Bug 1766046 - cleanup animation-name. r=boris 2022-04-25 08:23:51 +00:00
startupcache Bug 1752212 - Part 1: Pass loader type to PathifyURI. r=nbp 2022-04-13 14:08:06 +00:00
storage Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw 2022-03-16 18:47:08 +00:00
taskcluster Bug 1765223 - Turn off isolated process xpcshell tests. r=aryx 2022-04-25 15:11:06 +00:00
testing Bug 1765894 - Make WebMIDI early-beta-or-earlier. r=gsvelto 2022-04-25 15:40:27 +00:00
third_party Bug 1765520 - Use a faster traversal for render_on / free_after r=gfx-reviewers,lsalzman 2022-04-22 21:17:39 +00:00
toolkit Bug 1740792 - Replace TODO with explanatory comment r=rpl DONTBUILD 2022-04-25 15:51:58 +00:00
tools Bug 1763474 - Report thread wake-ups and CPU time per thread through glean, r=gerald,chutten 2022-04-23 11:38:19 +00:00
uriloader Bug 1735746 - External protocol navigation sandbox tests. r=nika 2022-04-20 11:06:51 +00:00
view
widget Bug 1764312 - Back out bug 1688998 for causing long startup times on some systems. 2022-04-22 16:14:02 +00:00
xpcom Bug 1765822: Do not assert but just bail out on missing event target in nsTimerImpl::InitCommon. r=smaug 2022-04-25 10:46:25 +00:00
xpfe/appshell Bug 1736479 - Make gfx SanityTest.jsm work again r=gfx-reviewers,bradwerth 2022-04-20 01:08:52 +00:00
.arcconfig
.babel-eslint.rc.js
.clang-format
.clang-format-ignore Bug 1765179: Remove dom/webgpu/ffi. r=jgilbert DONTBUILD 2022-04-19 22:26:40 +00:00
.cron.yml Bug 1766097 - remove .cron entry for perftest-s7. r=sparky 2022-04-25 15:27:05 +00:00
.eslintignore Bug 1757552 - [devtools] Generate actor-less reps stubs.r=bomsy. 2022-03-03 16:16:50 +00:00
.eslintrc.js Bug 1762683 - Fix ESLint rule warnings for no-unused-vars in intl/uconv/tests/unit/test_bug317216.js. r=Standard8 2022-04-19 11:22:34 +00:00
.flake8
.git-blame-ignore-revs
.gitattributes
.gitignore Bug 1759087 - Ignore Visual Studio user config files in VCS. r=mhentges 2022-03-11 15:40:52 +00:00
.hg-annotate-ignore-revs
.hg-format-source
.hgignore Bug 1761655 - Ignore mypy cache files r=jgraham 2022-03-31 13:52:11 +00:00
.hgtags No bug - tagging 1ce63246334ec627d74c38d7acd5b858c781336a with FIREFOX_NIGHTLY_100_END a=release DONTBUILD CLOSED TREE 2022-04-04 15:55:12 +00:00
.lando.ini
.lldbinit
.mailmap
.prettierignore
.prettierrc
.taskcluster.yml Bug 1762128 - bump the cache name for decision images to stop interfering with other trees. r=releng-reviewers,ahal a=release 2022-03-30 14:54:03 +02:00
.trackerignore
.yamllint
.ycm_extra_conf.py
aclocal.m4 Bug 1747970 - Move AC_CHECK_FUNC{,S} to python configure. r=firefox-build-system-reviewers,andi 2022-01-20 21:01:20 +00:00
AUTHORS
build.gradle Bug 1764549 - Update Glean SDK to v44.1.1 r=TravisLong 2022-04-14 20:35:08 +00:00
Cargo.lock Bug 1765520 - Use a faster traversal for render_on / free_after r=gfx-reviewers,lsalzman 2022-04-22 21:17:39 +00:00
Cargo.toml Bug 1751693 - Followup: Address missed review comment by glandium. r=glandium DONTBUILD 2022-04-22 04:59:07 +00:00
client.mk
client.py
CLOBBER Bug 1759324 - update libvpx to v1.11.0 r=bryce 2022-04-11 08:54:39 +00:00
configure.in
configure.py Bug 1747332 - Move build environment checks to configure.py. r=firefox-build-system-reviewers,andi 2021-12-23 20:47:47 +00:00
GNUmakefile
gradle.properties
gradlew
gradlew.bat
LICENSE
mach Bug 1752927: Avoid distutils deprecation warning on every Mach call r=ahal 2022-02-04 21:49:15 +00:00
mach.cmd Bug 1750874: Support launching Mach with py instead of python r=glandium 2022-01-21 18:22:58 +00:00
mach.ps1 Bug 1761633 - Silence the possible error from Get-Command r=mhentges DONTBUILD 2022-03-28 19:13:18 +00:00
Makefile.in Bug 1751515 - Part 3: Do not install artifact test archive when --disable-tests. r=firefox-build-system-reviewers,glandium 2022-01-26 19:08:57 +00:00
moz.build Bug 1753127 - NSPR doc: move the doc into docs/nspr UPGRADE_NSS_RELEASE r=kaie,bbeurdouche 2022-02-02 17:19:51 +00:00
moz.configure Bug 1544779 - Prioritize mozmake over mingw32-make. r=firefox-build-system-reviewers,andi 2022-03-29 08:26:06 +00:00
mozilla-config.h.in Bug 1746991 - Avoid warning noise from __STDC_CONSTANT_MACROS being redefined. r=firefox-build-system-reviewers,andi 2021-12-21 21:22:26 +00:00
old-configure.in Bug 1752064 - Move the remainder of AS to python configure. r=firefox-build-system-reviewers,andi 2022-02-03 00:06:29 +00:00
package-lock.json Bug 1725952 - Upgrade ESLint to v8.x. r=Mardak 2022-04-22 11:23:30 +00:00
package.json Bug 1725952 - Upgrade ESLint to v8.x. r=Mardak 2022-04-22 11:23:30 +00:00
README.txt
settings.gradle Bug 1753914 - ./mach environment is failed in gradle task on Windows. r=nalexander 2022-02-08 06:19:41 +00:00
substitute-local-geckoview.gradle Bug 1752381 - only parse stdout in substitute-local-geckoview. r=nalexander 2022-02-02 18:00:46 +00:00
test.mozbuild

An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Firefox from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.