Simplify constructor in CachedBitmap by removing duplicate type checks#9333
Merged
Conversation
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
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 :) |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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