-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Simplify constructor in CachedBitmap by removing duplicate type checks #9333
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
Merged
Conversation
This file contains hidden or 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
53b6c11 to
a3521c6
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
@siagupta0202 The auto merge results in a missing using for By the way, #9395 is almost the same if you wanna have a look. |
a3521c6 to
8953fd2
Compare
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Imaging/CachedBitmap.cs
Show resolved
Hide resolved
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
siagupta0202
approved these changes
Jan 15, 2025
Contributor
|
@h3xds1nz Thank you for your contribution! |
Member
Author
|
@siagupta0202 Thank you :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Community Contribution
A label for all community Contributions
PR
metadata: Label to tag PRs, to facilitate with triage
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.
Description
Removes redundant type checks second-time around when constructing
CachedBitmap(this constructor is used byBitmapSource.Create(). There's minimal performance benefit, the main goal here is code simplification, that has been made possible with the introduction ofGetArrayDataReferencefew releases ago.Method has been tested with all array types for correct functionality when constructing in-memory Bitmap.
Customer Impact
Smaller code-size of PresentationCore.
Regression
None.
Testing
Build, constructing Bitmap from memory source.
Risk
Low.
Microsoft Reviewers: Open in CodeFlow