Merge branch 'upstream'
Former-commit-id: 5b234de5e063e05b289d11486891259f4be4a2d3
This commit is contained in:
commit
7e9014eda4
@ -1 +1 @@
|
||||
a1910ea7fa5f93873a406165ad72ebe1d0540f58
|
||||
78976892a3815bf2dbd924b855d2e86954e20bd7
|
@ -1,7 +1,9 @@
|
||||
check-roslyn:
|
||||
@echo "Runnning roslyn tests using mono from PATH:"
|
||||
mono --version
|
||||
@$(MAKE) validate-roslyn RESET_VERSIONS=1
|
||||
cd $(ROSLYN_PATH); \
|
||||
./build.sh --restore --build --test --mono || exit; \
|
||||
echo "done"
|
||||
|
||||
# Disabled because it doesn't build anymore due to removed myget feeds
|
||||
# @echo "Runnning roslyn tests using mono from PATH:"
|
||||
# mono --version
|
||||
# @$(MAKE) validate-roslyn RESET_VERSIONS=1
|
||||
# cd $(ROSLYN_PATH); \
|
||||
# ./build.sh --restore --build --test --mono || exit; \
|
||||
# echo "done"
|
||||
|
@ -1 +1 @@
|
||||
8bb246480224e45a5aca4c749f92408f2ffb54f2
|
||||
4507e4245e116fef6755126509cf37ab636ab3a3
|
@ -1 +1 @@
|
||||
bb7096fb88dca25faa8a375945b52d8334e118bb
|
||||
6c214d60234febf60bae5f49954c006373c42be9
|
@ -1 +1 @@
|
||||
f89ffeb1a7ba045965e3ab9bec7d658f8c860058
|
||||
137a70b84639d06bb44687c02b93243af2c384e8
|
692
external/bdwgc/autom4te.cache/requests
vendored
692
external/bdwgc/autom4te.cache/requests
vendored
File diff suppressed because it is too large
Load Diff
8
external/bdwgc/config.log
vendored
8
external/bdwgc/config.log
vendored
@ -10,11 +10,11 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
||||
## Platform. ##
|
||||
## --------- ##
|
||||
|
||||
hostname = az-ubuntu-generalac2250
|
||||
hostname = az-ubuntu-general4246e0
|
||||
uname -m = x86_64
|
||||
uname -r = 4.15.0-1100-azure
|
||||
uname -r = 4.15.0-1106-azure
|
||||
uname -s = Linux
|
||||
uname -v = #111~16.04.1-Ubuntu SMP Thu Nov 19 06:49:21 UTC 2020
|
||||
uname -v = #118~16.04.1-Ubuntu SMP Tue Jan 19 16:13:06 UTC 2021
|
||||
|
||||
/usr/bin/uname -p = unknown
|
||||
/bin/uname -X = unknown
|
||||
@ -747,7 +747,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
||||
CONFIG_COMMANDS =
|
||||
$ ./config.status
|
||||
|
||||
on az-ubuntu-generalac2250
|
||||
on az-ubuntu-general4246e0
|
||||
|
||||
config.status:1238: creating Makefile
|
||||
config.status:1238: creating bdw-gc.pc
|
||||
|
686
external/bdwgc/libatomic_ops/autom4te.cache/requests
vendored
686
external/bdwgc/libatomic_ops/autom4te.cache/requests
vendored
File diff suppressed because it is too large
Load Diff
2
external/bdwgc/libtool.REMOVED.git-id
vendored
2
external/bdwgc/libtool.REMOVED.git-id
vendored
@ -1 +1 @@
|
||||
401d5fbf5847eb552c3c59a37e0ac5e57cfc53cf
|
||||
3e1939eeef08305ca794bdfdd07dde24bc106151
|
@ -71,6 +71,7 @@ namespace Mono.Linker.Steps
|
||||
void ProcessAssembly (AssemblyDefinition assembly, XPathNodeIterator iterator)
|
||||
{
|
||||
ProcessTypes (assembly, iterator.Current.SelectChildren ("type", ""));
|
||||
ProcessResources (assembly, iterator.Current.SelectChildren ("resource", ""));
|
||||
}
|
||||
|
||||
void ProcessTypes (AssemblyDefinition assembly, XPathNodeIterator iterator)
|
||||
@ -184,6 +185,21 @@ namespace Mono.Linker.Steps
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessResources (AssemblyDefinition assembly, XPathNodeIterator iterator)
|
||||
{
|
||||
while (iterator.MoveNext ()) {
|
||||
XPathNavigator nav = iterator.Current;
|
||||
|
||||
string name = GetAttribute (nav, "name");
|
||||
if (String.IsNullOrEmpty (name)) {
|
||||
Context.LogMessage (MessageImportance.High, $"Invalid value for 'name' attribute: '{name}'.");
|
||||
return;
|
||||
}
|
||||
|
||||
Context.Annotations.AddResourceToRemove (assembly, name);
|
||||
}
|
||||
}
|
||||
|
||||
static bool TryConvertValue (string value, TypeReference target, out object result)
|
||||
{
|
||||
switch (target.MetadataType) {
|
||||
|
@ -405,6 +405,15 @@ Prepends <PREFIX> to the name of tools ran by the AOT compiler, i.e. 'as'/'ld'.
|
||||
example, --tool=prefix=arm-linux-gnueabi- will make the AOT compiler run
|
||||
'arm-linux-gnueabi-as' instead of 'as'.
|
||||
.TP
|
||||
.I ld-name=NAME
|
||||
One of the tools used for AOT builds is the linker. Its name differs between various
|
||||
systems and it may happen that the assumed default name of the binary is not present.
|
||||
If the toolchain used does not have a linker with the default name (e.g. Android NDK
|
||||
r22 does not have the default 'ld' linker prefixed with 'tool-prefix' above, instead
|
||||
it has prefixed 'ld.gold' and 'ld.bfd' linkers) this option can be used to set the
|
||||
linker binary name. It will be prefixed with 'tool-prefix' to form the full linker
|
||||
executable name.
|
||||
.TP
|
||||
.I verbose
|
||||
Prints additional information about type loading failures.
|
||||
.TP
|
||||
|
@ -41,7 +41,7 @@ static partial class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "6.12.0.114";
|
||||
public const string MonoVersion = "6.12.0.122";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -41,6 +41,93 @@ namespace System.Drawing.Imaging {
|
||||
[Editor ("System.Drawing.Design.MetafileEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
|
||||
public sealed class Metafile : Image {
|
||||
|
||||
// Non-null if a graphics instance was created using
|
||||
// Graphics.FromImage(this) The metadata holder is responsible for
|
||||
// freeing the nativeImage if the Metadata instance is disposed before
|
||||
// the Graphics instance.
|
||||
private MetafileHolder _metafileHolder;
|
||||
|
||||
// A class responsible for disposing of the native Metafile instance
|
||||
// if it needs to outlive the managed Metafile instance.
|
||||
//
|
||||
// The following are both legal with win32 GDI+:
|
||||
// Metafile mf = ...; // get a metafile instance
|
||||
// Graphics g = Graphics.FromImage(mf); // get a graphics instance
|
||||
// g.Dispose(); mf.Dispose(); // dispose of the graphics instance first
|
||||
// OR
|
||||
// mf.Dispose(); g.Dispose(); // dispose of the metafile instance first
|
||||
//
|
||||
// ligbgdiplus has a bug where disposing of the metafile instance first will
|
||||
// trigger a use of freed memory when the graphics instance is disposed, which
|
||||
// could lead to crashes when the native memory is reused.
|
||||
//
|
||||
// The metafile holder is designed to take ownership of the native metafile image
|
||||
// when the managed Metafile instance is disposed while a Graphics instance is still
|
||||
// not disposed (ie the second code pattern above) and to keep the native image alive until the graphics
|
||||
// instance is disposed.
|
||||
//
|
||||
// Note that the following throws, so we only ever need to keep track of one Graphics
|
||||
// instance at a time:
|
||||
// Metafile mf = ...; // get a metafile instance
|
||||
// Graphics g = Graphics.FromImage(mf);
|
||||
// Graphics g2 = Graphics.FromImage(mf); // throws OutOfMemoryException on GDI+ on Win32
|
||||
internal sealed class MetafileHolder : IDisposable
|
||||
{
|
||||
private bool _disposed;
|
||||
private IntPtr _nativeImage;
|
||||
|
||||
|
||||
internal bool Disposed { get => _disposed; }
|
||||
internal MetafileHolder()
|
||||
{
|
||||
_disposed = false;
|
||||
_nativeImage = IntPtr.Zero;
|
||||
}
|
||||
|
||||
~MetafileHolder() => Dispose(false);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
internal void Dispose(bool disposing)
|
||||
{
|
||||
if (!_disposed)
|
||||
{
|
||||
IntPtr nativeImage = _nativeImage;
|
||||
_nativeImage = IntPtr.Zero;
|
||||
_disposed = true;
|
||||
if (nativeImage != IntPtr.Zero)
|
||||
{
|
||||
Status status = GDIPlus.GdipDisposeImage(nativeImage);
|
||||
GDIPlus.CheckStatus(status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal void MetafileDisposed(IntPtr nativeImage)
|
||||
{
|
||||
_nativeImage = nativeImage;
|
||||
}
|
||||
|
||||
internal void GraphicsDisposed()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
internal MetafileHolder AddMetafileHolder()
|
||||
{
|
||||
// If _metafileHolder is not null and hasn't been disposed yet, there's already a graphics instance associated with
|
||||
// this metafile, the native code will return an error status.
|
||||
if (_metafileHolder != null && !_metafileHolder.Disposed)
|
||||
return null;
|
||||
_metafileHolder = new MetafileHolder();
|
||||
return _metafileHolder;
|
||||
}
|
||||
|
||||
// constructors
|
||||
|
||||
internal Metafile (IntPtr ptr)
|
||||
@ -324,6 +411,21 @@ namespace System.Drawing.Imaging {
|
||||
GDIPlus.CheckStatus (status);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (_metafileHolder != null && !_metafileHolder.Disposed)
|
||||
{
|
||||
// There's a graphics instance created from this Metafile,
|
||||
// transfer responsibility for disposing the nativeImage to the
|
||||
// MetafileHolder
|
||||
_metafileHolder.MetafileDisposed(nativeObject);
|
||||
_metafileHolder = null;
|
||||
nativeObject = IntPtr.Zero;
|
||||
}
|
||||
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
public IntPtr GetHenhmetafile ()
|
||||
|
@ -48,6 +48,7 @@ namespace System.Drawing
|
||||
private static float defDpiX = 0;
|
||||
private static float defDpiY = 0;
|
||||
private IntPtr deviceContextHdc;
|
||||
private Metafile.MetafileHolder _metafileHolder;
|
||||
|
||||
public delegate bool EnumerateMetafileProc (EmfPlusRecordType recordType,
|
||||
int flags,
|
||||
@ -62,6 +63,13 @@ namespace System.Drawing
|
||||
nativeObject = nativeGraphics;
|
||||
}
|
||||
|
||||
internal Graphics(IntPtr nativeGraphics, Image image) : this(nativeGraphics)
|
||||
{
|
||||
if (image is Metafile mf) {
|
||||
_metafileHolder = mf.AddMetafileHolder();
|
||||
}
|
||||
}
|
||||
|
||||
~Graphics ()
|
||||
{
|
||||
Dispose ();
|
||||
@ -297,6 +305,14 @@ namespace System.Drawing
|
||||
status = GDIPlus.GdipDeleteGraphics (nativeObject);
|
||||
nativeObject = IntPtr.Zero;
|
||||
GDIPlus.CheckStatus (status);
|
||||
|
||||
if (_metafileHolder != null)
|
||||
{
|
||||
var mh = _metafileHolder;
|
||||
_metafileHolder = null;
|
||||
mh.GraphicsDisposed();
|
||||
}
|
||||
|
||||
disposed = true;
|
||||
}
|
||||
|
||||
@ -1773,8 +1789,7 @@ namespace System.Drawing
|
||||
|
||||
Status status = GDIPlus.GdipGetImageGraphicsContext (image.nativeObject, out graphics);
|
||||
GDIPlus.CheckStatus (status);
|
||||
Graphics result = new Graphics (graphics);
|
||||
|
||||
Graphics result = new Graphics (graphics, image);
|
||||
if (GDIPlus.RunningOnUnix ()) {
|
||||
Rectangle rect = new Rectangle (0,0, image.Width, image.Height);
|
||||
GDIPlus.GdipSetVisibleClip_linux (result.NativeObject, ref rect);
|
||||
|
@ -1 +1 @@
|
||||
f7c90ecb7039b50c849d8fc69a3fb9c667d25dc2
|
||||
b6ae1a389abf8522eb2af7c466bcdeabe7d07afe
|
@ -1 +1 @@
|
||||
157a5eea0abf5e481b743673ee36f6be52867eaa
|
||||
3ee05f5b1da596ed5b5bf621b39a71a9136d47db
|
@ -1 +1 @@
|
||||
1cb2387450c7e89fd61edd24512b842176e9781b
|
||||
4a32b1562eb1c560259c3fd6f9b69f58a75079dc
|
@ -1 +1 @@
|
||||
2f467d3215b80c901624dec1d5e46b396a58314b
|
||||
1bf60cd84b6fba28d0d547dd1fea857957452f52
|
@ -1 +1 @@
|
||||
accaedfebd11e960ce98e110d23a3271cce0b160
|
||||
6cf153d1bd08986c8c4d67bc30530b4811d1fba6
|
@ -1 +1 @@
|
||||
7059a34ac29e613ec9ff517294b1c2cffd697e9e
|
||||
222ff52486c984e80ea2a48d3c49ca9c6a141641
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user