Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | This is the ANGLE project, from http://code.google.com/p/angleproject/ |
michael@0 | 2 | |
michael@0 | 3 | Current revision: f3fc6571dca9832876e09c63b0958d413737757b |
michael@0 | 4 | Date of revision: 2013-08-02 |
michael@0 | 5 | |
michael@0 | 6 | == Applied local patches == |
michael@0 | 7 | In this order: |
michael@0 | 8 | angle-build-stdcall-alias.patch: |
michael@0 | 9 | Fix an issue GCC has with linking to undecorated stdcalls. |
michael@0 | 10 | |
michael@0 | 11 | angle-build-dedupe-debug-cpp-h.patch: |
michael@0 | 12 | Rename: "src/compiler/debug.{cpp,h}" |
michael@0 | 13 | To: "src/compiler/compiler_debug.{cpp,h}" |
michael@0 | 14 | Repair includes accordingly. |
michael@0 | 15 | |
michael@0 | 16 | angle-build-d3dcompiler-list.patch: |
michael@0 | 17 | Move `ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES` define from make files to |
michael@0 | 18 | Renderer.cpp, where it's used. |
michael@0 | 19 | |
michael@0 | 20 | angle-build-khrplatform-h-path.patch: |
michael@0 | 21 | Fix include path for khrplatform.h. |
michael@0 | 22 | |
michael@0 | 23 | angle-build-case-sensitive.patch |
michael@0 | 24 | Fixes cross compilation on case sensitive OSes. |
michael@0 | 25 | |
michael@0 | 26 | angle-build-dedupe-uniform-cpp-h.patch: |
michael@0 | 27 | Rename: "src/compiler/Uniform.{cpp,h}" |
michael@0 | 28 | To: "src/compiler/CompilerUniform.{cpp,h}" |
michael@0 | 29 | Repair includes accordingly. |
michael@0 | 30 | |
michael@0 | 31 | angle-build-ttype.patch: |
michael@0 | 32 | Remove bit-field markings for TType, since GCC4.7 emits a default |
michael@0 | 33 | copy constructor which fails to compile. |
michael@0 | 34 | |
michael@0 | 35 | angle-long-ident-hash.patch: |
michael@0 | 36 | Use MurmurHash3 for long identifier hashing. See bug 676071, where we used |
michael@0 | 37 | Spooky Hash, before ANGLE came with MurmurHash3. |
michael@0 | 38 | |
michael@0 | 39 | angle-faceforward-emu.patch: |
michael@0 | 40 | Adds emulation for faceforward(float,float,float), which is needed to |
michael@0 | 41 | prevent crashing on Mac+Intel. See bug 771406. |
michael@0 | 42 | |
michael@0 | 43 | angle-default-clamp-strat.patch: |
michael@0 | 44 | Fixes TCompiler::Init to treat `resources.ArrayIndexClampingStrategy` |
michael@0 | 45 | as a request for the default strategy. |
michael@0 | 46 | |
michael@0 | 47 | angle-tex-pool-default.patch: |
michael@0 | 48 | Don't use D3DPOOL_MANAGED on D3D9. Just use D3DPOOL_DEFAULT. |
michael@0 | 49 | |
michael@0 | 50 | angle-build-unified.patch: |
michael@0 | 51 | Fixes required to make angle compile in unified mode |
michael@0 | 52 | Note that a different version of this patch was upstreamed, so the next time that |
michael@0 | 53 | Angle is updated this patch can be discarded. See: |
michael@0 | 54 | https://chromium.googlesource.com/angle/angle/+/0dd3b3ff66cdc50882125d21e60112d5161279b4 |
michael@0 | 55 | https://chromium.googlesource.com/angle/angle/+/0685fbde65a3e90d8d4d4a6c72f2cc1771617fd0 |
michael@0 | 56 | |
michael@0 | 57 | angle-fix-vc12.patch: |
michael@0 | 58 | Fixes angle to build on Visual Studio 2013 |
michael@0 | 59 | |
michael@0 | 60 | angle-d3dcc47.patch: |
michael@0 | 61 | Tell ANGLE about d3dcompiler_47.dll from WinSDK 8.1. |
michael@0 | 62 | |
michael@0 | 63 | angle-fix-issue-651.patch: |
michael@0 | 64 | Fixes crash in TSymbolTableLevel::~TSymbolTableLevel with GCC 4.9 |
michael@0 | 65 | |
michael@0 | 66 | In addition to these patches, the Makefile.in and moz.build build files are ours, |
michael@0 | 67 | they're not present in upsteam ANGLE. Therefore, changes made to the build files |
michael@0 | 68 | should not be stored in the local .patch files. |
michael@0 | 69 | |
michael@0 | 70 | |
michael@0 | 71 | == How to do a clean-slate upgrade == |
michael@0 | 72 | 1. Backup our moz-specific files: |
michael@0 | 73 | README.mozilla |
michael@0 | 74 | Makefile.in |
michael@0 | 75 | moz.build |
michael@0 | 76 | *.patch |
michael@0 | 77 | src/libEGL/Makefile.in |
michael@0 | 78 | src/libEGL/moz.build |
michael@0 | 79 | src/libGLESv2/Makefile.in |
michael@0 | 80 | src/libGLESv2/moz.build |
michael@0 | 81 | |
michael@0 | 82 | 2. $ rm -rf gfx/angle |
michael@0 | 83 | |
michael@0 | 84 | 3. Copy the folder containing the angle rev you want onto gfx/angle. |
michael@0 | 85 | $ svn export -r <rev> <src> <moz-central>/gfx/angle |
michael@0 | 86 | Or: |
michael@0 | 87 | $ git checkout-index --prefix <moz-central>/gfx/angle/ -a |
michael@0 | 88 | |
michael@0 | 89 | 4. Fold our moz-specific files into this new angle folder. (Makefiles, README) |
michael@0 | 90 | 4a. Remove the unused files. (test/, samples/, msvc files) |
michael@0 | 91 | |
michael@0 | 92 | 5. Clear out the "Applied Local Patches" section above, since we're going to |
michael@0 | 93 | repopulate it. |
michael@0 | 94 | |
michael@0 | 95 | 6. Re-apply the angle-build-*.patch files and record them above. |
michael@0 | 96 | |
michael@0 | 97 | 7. Update the Makefile.in files with the current deps from the .gyp(i) files. |
michael@0 | 98 | |
michael@0 | 99 | 8. Build. Fix things until it builds. |
michael@0 | 100 | |
michael@0 | 101 | 9. Reapply the rest of the .patch files and record them above. |
michael@0 | 102 | |
michael@0 | 103 | 10. Try runs and reviews! |
michael@0 | 104 | |
michael@0 | 105 | |
michael@0 | 106 | == Applying Diffs == |
michael@0 | 107 | In general: |
michael@0 | 108 | $ patch -p1 -R < gfx/angle/angle-some-bug-fix.patch |
michael@0 | 109 | |
michael@0 | 110 | SVN diffs however can be iffy. They don't seem to be completely compatible |
michael@0 | 111 | with `patch`. Be aware that you'll likely get rejects whenever a file is |
michael@0 | 112 | removed. |
michael@0 | 113 | |
michael@0 | 114 | |
michael@0 | 115 | |
michael@0 | 116 | == How to do an incremental update == |
michael@0 | 117 | Same general idea here, but instead of nuking the ANGLE dir, we're going to |
michael@0 | 118 | have to get a diff between revs from SVN, and deal with applying that. We |
michael@0 | 119 | also naturally have to peel off our local patches before we can apply a diff |
michael@0 | 120 | from upstream. |
michael@0 | 121 | |
michael@0 | 122 | 1. Unapply patches |
michael@0 | 123 | |
michael@0 | 124 | Unapply them in reverse order, so iterate over the above list of applied patch |
michael@0 | 125 | starting from the bottom. You most likely want to record these patch-unapply |
michael@0 | 126 | operations as individual patches themselves, in order to re-apply patches later. |
michael@0 | 127 | |
michael@0 | 128 | $ cd /path/to/mozilla-central |
michael@0 | 129 | |
michael@0 | 130 | $ patch -p1 -R < gfx/angle/angle-some-bug-fix.patch |
michael@0 | 131 | $ hg qnew unapply-angle-some-bug-fix.patch |
michael@0 | 132 | |
michael@0 | 133 | 2. Apply diff with new ANGLE version |
michael@0 | 134 | |
michael@0 | 135 | Check at the top of this file what ANGLE revision we currently have. Let's say it's |
michael@0 | 136 | r123. Check at the ANGLE Web site what recent revisions look like to figure what |
michael@0 | 137 | revision seems safe. Let's say we want r456. |
michael@0 | 138 | |
michael@0 | 139 | $ cd |
michael@0 | 140 | $ svn checkout http://angleproject.googlecode.com/svn/trunk/ angleproject |
michael@0 | 141 | $ cd angleproject |
michael@0 | 142 | $ svn diff -r 123:456 > ~/angle-diff-from-123-to-456 |
michael@0 | 143 | $ cd /path/to/mozilla-central |
michael@0 | 144 | $ cd gfx/angle |
michael@0 | 145 | $ patch -p0 < ~/angle-diff-from-123-to-456 |
michael@0 | 146 | $ cd ../.. |
michael@0 | 147 | $ hg status |
michael@0 | 148 | # hg add any new ANGLE files under gfx/angle |
michael@0 | 149 | $ hg qnew angle-diff-from-123-to-456 |
michael@0 | 150 | |
michael@0 | 151 | 3. Reapply patches |
michael@0 | 152 | |
michael@0 | 153 | You may have to skip reapplying certain patches there, for example if they have |
michael@0 | 154 | been integrated into ANGLE since our last update. The short patch descriptions above |
michael@0 | 155 | in this file should help you make that decision. |
michael@0 | 156 | |
michael@0 | 157 | If you have recorded the individual patch unapply operations in step 1 as separate |
michael@0 | 158 | Mercurial patches, this will be easy, just apply the inverse patches now, in reverse |
michael@0 | 159 | order: |
michael@0 | 160 | |
michael@0 | 161 | $ patch -p1 -R < .hg/patches/unapply-angle-some-bug-fix.patch |
michael@0 | 162 | $ hg status |
michael@0 | 163 | # hg add any new ANGLE files under gfx/angle |
michael@0 | 164 | $ hg qnew angle-some-bug-fix.patch |
michael@0 | 165 | |
michael@0 | 166 | Note that here you need to proceed in the reverse order of what you did in step 1. |
michael@0 | 167 | |
michael@0 | 168 | 4. Update our Makefiles |
michael@0 | 169 | |
michael@0 | 170 | Open your ANGLE diff file (~/angle-diff-from-123-to-456), search for GYP files |
michael@0 | 171 | (e.g. build_angle.gyp), it's easy-to-read JSON. It may list additions of new files, |
michael@0 | 172 | or removal of old files. You have to reflect this in our Makefiles: |
michael@0 | 173 | |
michael@0 | 174 | gfx/angle/Makefile.in |
michael@0 | 175 | gfx/angle/src/libEGL/Makefile.in |
michael@0 | 176 | gfx/angle/src/libGLESv2/Makefile.in |
michael@0 | 177 | |
michael@0 | 178 | The first one is our main Makefile. It has basically the ANGLE shader compiler. |
michael@0 | 179 | Changes there will typically have to be applied also to the two other Makefiles. |
michael@0 | 180 | These two other Makefiles are Windows-only and build the ANGLE GLES2-on-top-of-D3D |
michael@0 | 181 | implementation. |
michael@0 | 182 | |
michael@0 | 183 | 5. Update patch files |
michael@0 | 184 | |
michael@0 | 185 | Something like: |
michael@0 | 186 | |
michael@0 | 187 | $ cp .hg/patches/angle-some-bug-fix.patch gfx/angle |
michael@0 | 188 | |
michael@0 | 189 | For each patch that you reapplied. |
michael@0 | 190 | |
michael@0 | 191 | If a patch was removed (not reapplied), remove the corresponding patch file. |
michael@0 | 192 | |
michael@0 | 193 | 6. Update this README.mozilla |
michael@0 | 194 | |
michael@0 | 195 | You'll have to update at least the ANGLE revision number and probably the patch |
michael@0 | 196 | list as well. |
michael@0 | 197 | |
michael@0 | 198 | 7. Push to Try |
michael@0 | 199 | |
michael@0 | 200 | Make sure to test both Windows and non-Windows, and enable mochitest-1 in your |
michael@0 | 201 | Try options. You may want reftest as well, as we have WebGL reftests. |
michael@0 | 202 | |
michael@0 | 203 | 8. Get reviews. |
michael@0 | 204 | |
michael@0 | 205 | Typically, you would get review on your Makefiles patch, and any |
michael@0 | 206 | new patches that you need to add to get this update to work. |
michael@0 | 207 | |
michael@0 | 208 | You do not need a review for the ANGLE diff itself and for trivial updates of |
michael@0 | 209 | existing patches. |
michael@0 | 210 | |
michael@0 | 211 | |
michael@0 | 212 | == Visual Studio Solution Files == |
michael@0 | 213 | Ignore these. We don't use them anymore. We use custom Makefiles. |
michael@0 | 214 | |
michael@0 | 215 | |
michael@0 | 216 | == Generated parser code== |
michael@0 | 217 | Don't bother about that anymore. The parser is now generated and included in the ANGLE svn repo. |