From f2f71a7ceb906c551915aab088d6149a634c0705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Tue, 23 Mar 2021 11:18:08 +0100 Subject: [PATCH] Changed: #1661 Slow rendering warning is optional with default to not display --- CHANGELOG.md | 4 ++++ .../decompiler/flash/configuration/Configuration.java | 4 ++++ src/com/jpexs/decompiler/flash/gui/ImagePanel.java | 4 +++- .../flash/gui/locales/AdvancedSettingsDialog.properties | 2 ++ .../gui/locales/AdvancedSettingsDialog_cs.properties | 8 +++++++- 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b71fb2d94..cd367914e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ All notable changes to this project will be documented in this file. - Flash viewer - linear colorspace radial gradient - Folder preview of frames with time increasing +### Changed +- [#1661] Slow rendering warning is optional with default to not display + ## [14.2.1] - 2021-03-13 ### Added - Placeobject display and edit - raw editor on right side @@ -2133,6 +2136,7 @@ All notable changes to this project will be documented in this file. [alpha 8]: https://github.com/jindrapetrik/jpexs-decompiler/compare/alpha7...alpha8 [alpha 7]: https://github.com/jindrapetrik/jpexs-decompiler/releases/tag/alpha7 [#1660]: https://www.free-decompiler.com/flash/issues/1660 +[#1661]: https://www.free-decompiler.com/flash/issues/1661 [#1435]: https://www.free-decompiler.com/flash/issues/1435 [#1488]: https://www.free-decompiler.com/flash/issues/1488 [#1584]: https://www.free-decompiler.com/flash/issues/1584 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java index 879a0f0c2..6255f04ae 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java @@ -701,6 +701,10 @@ public final class Configuration { @ConfigurationCategory("limit") public static ConfigurationItem limitAs3PCodeOffsetMatching = null; + @ConfigurationDefaultBoolean(false) + @ConfigurationInternal + public static ConfigurationItem showSlowRenderingWarning = null; + private enum OSId { WINDOWS, OSX, UNIX } diff --git a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java index 90f1a6d9b..5cb437549 100644 --- a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java +++ b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java @@ -1907,7 +1907,9 @@ public final class ImagePanel extends JPanel implements MediaDisplay { sw.stop(); if (sw.getElapsedMilliseconds() > 100) { - logger.log(Level.WARNING, "Slow rendering. {0}. frame, time={1}, {2}ms", new Object[]{frame, time, sw.getElapsedMilliseconds()}); + if (Configuration.showSlowRenderingWarning.get()) { + logger.log(Level.WARNING, "Slow rendering. {0}. frame, time={1}, {2}ms", new Object[]{frame, time, sw.getElapsedMilliseconds()}); + } } if (renderContext.borderImage != null) { diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties index 1d8bc2749..b1d26cda8 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties @@ -523,4 +523,6 @@ config.description.useAsTypeIcons = Use different icons for different script typ config.name.limitAs3PCodeOffsetMatching = Limit of AS3 P-code offset matching config.description.limitAs3PCodeOffsetMatching = Limit of instructions in AS3 P-code which are offset-matched to AS3 script +config.name.showSlowRenderingWarning = Log warning when rendering is too slow +config.description.showSlowRenderingWarning = Logs warning when internal flash viewer is too slow to display content diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties index be645ed9c..11061cab0 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties @@ -510,4 +510,10 @@ config.name.displayAs3TraitsListAndConstantsPanel = Zobrazit panel se seznamem A config.description.displayAs3TraitsListAndConstantsPanel = Zobraz\u00ed panel se seznamem AS3 vlastnost\u00ed a konstant pod stromem tag\u016f. config.name.useAsTypeIcons = Pou\u017e\u00edt ikony skript\u016f na z\u00e1klad\u011b typu polo\u017eky -config.description.useAsTypeIcons = Pou\u017eije r\u016fzn\u00e9 ikony pro r\u016fzn\u00e9 typy skript\u016f (t\u0159\u00edda/interface/frame/...) \ No newline at end of file +config.description.useAsTypeIcons = Pou\u017eije r\u016fzn\u00e9 ikony pro r\u016fzn\u00e9 typy skript\u016f (t\u0159\u00edda/interface/frame/...) + +config.name.limitAs3PCodeOffsetMatching = Limit matchov\u00e1n\u00ed offset\u016f v AS3 p-k\u00f3du +config.description.limitAs3PCodeOffsetMatching = Limit instrukc\u00ed v AS3 p-k\u00f3du kter\u00e9 jsou matchovan\u00e9 offsetem na AS3 skript + +config.name.showSlowRenderingWarning = Zalogovat varov\u00e1n\u00ed kdy\u017e je renderov\u00e1n\u00ed p\u0159\u00edli\u0161 pomal\u00e9 +config.description.showSlowRenderingWarning = Zaloguje varov\u00e1n\u00ed kdy\u017e intern\u00ed zobrazova\u010d flashe je p\u0159\u00edli\u0161 pomal\u00fd na zobrazen\u00ed obsahu \ No newline at end of file