-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactors drawing Images, and simplifies roRegions to use the canvas of their associated Bitmap #139
Merged
lvcabral
merged 14 commits into
lvcabral:v0.10.0-emu
from
markwpearce:roregion-uses-bitmaps-canvas
Mar 10, 2023
Merged
Refactors drawing Images, and simplifies roRegions to use the canvas of their associated Bitmap #139
lvcabral
merged 14 commits into
lvcabral:v0.10.0-emu
from
markwpearce:roregion-uses-bitmaps-canvas
Mar 10, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lvcabral
reviewed
Mar 8, 2023
lvcabral
reviewed
Mar 8, 2023
lvcabral
reviewed
Mar 8, 2023
markwpearce
force-pushed
the
roregion-uses-bitmaps-canvas
branch
from
March 9, 2023 13:26
8abc5d9
to
fd80a82
Compare
…sing save and restore for context changes
markwpearce
force-pushed
the
roregion-uses-bitmaps-canvas
branch
from
March 10, 2023 14:33
fd80a82
to
afe1f62
Compare
Kudos, SonarCloud Quality Gate passed! |
lvcabral
added a commit
that referenced
this pull request
Mar 21, 2023
* Improvements on roDeviceInfo * Refactoring on example app to create a new api for the library * Moved browser compatibility detection to device module * Adding a python script to allow testing on newer Chrome browsers with COOP and COEP enabled. * Adding missing type to catch error object s * Updated browser detection * upgraded webpack * Replacing deprecated `substr()` method * Removing error object type to compile with old standard * Improved decoupling of device and control modules * Display module improvements * Refactoring to make brsEmu library an API * Added `willReadFrequently: true` to the canvas 2d context to improve performance * Improved the API and updated documentation * Improved documentation * Update Readme.md * Updated Readme.md * Updated Readme.md * Documentation updated * Updated webpack config * Linting fixes * Fixed tslint issue * Upgraded to TypeScript 4 and other dependencies * Added support for Firefox browser * Moved fullscreen code to index.js * Implemented use of `Atomics` with the `SharedArrayBuffer` and other small improvements. * Upgraded Prettier to v2.x to match brs project and support TypeScript 4 * Converted API code to TypeScript * Improved API Removed hammer.js from app Upgraded to es2021 * Added option to execute a channel without audio * Changed Exit Reason detection to use Roku parameters * Bumped version to 0.10.0 and changed serialNumber format * Added way to prevent canvas to be cleared after execution and other improvements to the API and docs * Added option to disable debug to console * Fixed issue: Back was not working as the first button pressed * Updated `roTimeSpan` to use `performance.now()` instead of `DateTime.now()` * Revert "Updated `roTimeSpan` to use `performance.now()` instead of `DateTime.now()`" This reverts commit e5e42dc. * Added option to show display performance (FPS) * Updated API * Updated dev version * 0.10.1 * Bump version to 0.10.2-dev and updated documentation * Implemented `roAppInfo` and prevent crash with invalid collection with `for each` #104 #118 * Implemented missing methods to `roUrlTransfer` as mocks to avoid channel crash. #104 * Adding test BrigthScript file to `roAppInfo` #104 * Implemented a mock of `RunGarbageCollector()` #119 * Started implementation of `roInput` #57 * Added missing methods to `roRegion` #120 * Implemented support for `ScaleMode` in `roRegion` #62 * Reduced double buffer in `roScreen` to only 2 canvas and removed usage of `willReadFrenquently` * Added `fps` event * Re-added `willReadFrequently` on `roScreen` and `roRegion` * Bump to v0.10.3-dev * Implemented numeric type auto cast in function parameters and return value #122 * Improved casting on `roBitmap`, `roRegion` and `roScreen` * Fixed `ifDraw2d` drawing methods on `roRegion` #120 * Prettier update * Bump to version 0.10.4-dev * feat(stdlib): Add lookupCI for assocarray (#639) resolves #629 Co-authored-by: Vasyl Martynych <c-vasyl.martynych@hulu.com> * fix(interp): Coerce function arguments and variable assignments into desired types (#620) The reference BrightScript Implementation performs quite a bit of type coercion during function calls and variable assignments, and `brs` didn't match those rules very closely. Cast values between types when needed during function calls and assignments. Co-authored-by: Sean Barag <sean.barag@hulu.com> * fix(interp): allow functions to be typed as objects (#659) * Fixed the edge case of comparing `invalid` with `roInvalid` * Improved API browser support handling and prettier updates * Bump version to 0.10.5-dev * Updated documentation * Implemented support for external input parameters #123 * Return `invalid` when `roCompositor` doesn't receive valid regions creating sprites #125 * Implemented support for `stop` statement, debug implementation is not complete #127 * Added support for Assignment, DotSet and Print for the debug mode and improved Telnet #127 * Created a separate module for the debugger #127 * Added support fo `p` and `q` as shorts for `print` and `exit` #127 * Made back trace report the next line for the debugger #127 * Prettier updates * Fixed casting issue on Debug.ts * v0.10.6-dev * Added API methods to handle the audio `mute` #128 * Implemented basic back trace #127 * Finished implementation for back trace support #127 * Adding new example file and updating documentation * Implemented support for the `step` command on MicroDebugger #127 * Making commands `over` and `out` the same as `step` for now #127 * Implemented support for `Ctrl+C` to start Micro Debugger #127 * Reduced the amount of times shared array was instantiated, and moved the check for `break` to `visitCall` * Adding support to Safari Tech Preview * Fixed TypeScript linting issue * Bump to 0.10.7-dev * Removed usage of `babel-loader` to the worker library to prevent performance issues. * Added dependency to `stats.js` to show performance stats overlay #129 * Fix shadow effect on `roScreen` and crash when sending an canvas with `zero` in dimensions #130 * Improved API and updated documentation * Removing debug code * Improvements to the Micro Debugger #127 * Prettier fixes * Simplified `redrawDisplay` method * Fixed stats panels spacing #129 * v0.10.8-dev * Canvas performance improvements * Fixed `drawRotatedObject` on `roScreen` and `roBitmap` * Implemented support for format parameter on `toStr()` #132 * Adding exception handling on `toStr()` with params #132 * Adding support to `format()` for `roString` #133 * Fixed display position when in full screen in non 16:9 monitors * Prettier fixes * Updated the API to enable/disable Performance Stats Changed the webpack settigns * v0.10.9-dev * Updated API documentation * Fixed stats overlay position #129 * Removing debug console log * Improved API to allow define the `canvas` size on redraw. * Changing the library in the package.json from main to browser * v0.10.10-dev * Re-adding the main entry to package.json * v0.10.11-dev * Adding missing audio files to the npm package * Clear `subtitle` when channel execution terminates * Fixed currentChannel title when loading `brs` file * Added support for both Windows and MacOS keyboard names * Simplified display module initialization * Prettier fixes * v0.10.12-dev * Upgrade to Webpack 5 and other dependencies * Removing unused dependencies * Improved control.js module * Prettier fix * v0.10.13-dev * Added `debug` level `beacon` * v0.10.14-dev * Fixed behavior of `setAlphaEnable` in most scenarios #12 * Identify OS to map keys accordingly * Prettier fixes * Implemented `end` and `stop` to terminate app without crash * Updated examples and documentation * v0.10.15-dev * Fixed `clearCanvas` in roBitmap and roScreen #12 #130 * Implemented missing `roDeviceInfo` methods #134 * Implemented missing `roChannelStore` methods #137 * Revert fix(interp): Coerce function arguments and variable assignments into desired types (#620) The reference BrightScript Implementation performs quite a bit of type coercion during function calls and variable assignments, and `brs` didn't match those rules very closely. Cast values between types when needed during function calls and assignments. Co-authored-by: Sean Barag <sean.barag@hulu.com> * Refactors drawing Images, and simplifies roRegions to use the canvas of their associated Bitmap (#139) * Refactor of bitmap and region drawing code * Changed non-alpha drawing to just clearing the underlying rect, and using save and restore for context changes * Removed commented out code * Fixes roCompositor drawing and pretranslations on roRegions * Leaving in some code for reference * Fixed issue with roCompositor * Removed commented code * Reverted non-alpha revert... it is too slow * Moved Digit8 for info to the webapp code * Fixes some comments from the PR * Fixes roCompositor and drawing to a non-0,0 based region * Fixes roCompositor issues with background clearing and unifies more draw calls * Solved issue of region wrapping in a compositor * Finish unifying drawing bitmaps with drawObjectToComponent * Updated documentation and API code organization * Applying coding standards (Prettier) * Upgraded webpack * v0.10.16-dev * Removing uneeded warning messages * Prevent clear the screen when `SwapBuffers()` is called with no changes. * Removed the usage of `putImageData` with `roRegions` * v0.10.17-dev * Extended handling of `isDirty` flag to `roBitmap` and `roRegion` * Function call performance (#141) * Make a ReturnValue not a JS Error * Removed unzipped data * Consolidated format error code * Update BlockEndReason.ts * Removed commented code * Change `roScreen` to support Safari * WebApp: Exit full screen when channel closes * Show icon when no splash exist in zip file * Prettier fixes * v0.10.18-dev * Make sure audio do not play if `stop()` is called during load * Small format and debug improvements * Added new event to start and end of micro debugger * v0.10.19-dev * Changed to only enable keyboard control when channel is running * v0.10.20-dev * Improved Micro Debugger * Pre-load the Worker library on initialization * Updated documentation for release * [sonar] Fixing duplicated keyboard mapping * [sonar] Code smell and complexity fix * [sonar] code smells: replace `var` by `const` and `let` * [sonar] Added Sonar Project properties file * [sonar] Reduced complexity on MicroDebugger.js --------- Co-authored-by: Vasya-M <33808928+Vasya-M@users.noreply.github.com> Co-authored-by: Volodymyr Buchii <volodymyrb78@gmail.com> Co-authored-by: Sean Barag <sean.barag@hulu.com> Co-authored-by: Levi Kipke <levi.kipke@hulu.com> Co-authored-by: Mark Pearce <mark.pearce@redspace.com> Co-authored-by: Mark Pearce <markwpearce@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
GetImageData()
(this was slow!)save()
/restore()
In particular, these changes increase the speed of certain operations: