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.
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
8088198: Exception thrown from snapshot if dimensions are larger than max texture size #68
8088198: Exception thrown from snapshot if dimensions are larger than max texture size #68
Changes from 4 commits
4bc4417
9986809
d4ecb73
5019172
8e44dea
8966936
fce986e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would extract this code into its own method similar to
doSnapshotTile
:assemble(scene, xMin, yMin, width, height, root, transform, depthBuffer, fill, camera, wimg, maxTextureSize);
(
assemble
is a bad name, I didn't think about a better one).The method can return he resulting
WritableImage
, but it is not needed since it is manipulated via "side-effects". I would, however, bring it line with theelse
clause - either both usewimg = methodName(..., wimg, ...);
or justmethodName(..., wimg, ...);
. This is fine since the inputWritableImage
is nevernull
. From a readability point of view, using return values seems better.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% convinced this would really add much to the readability of the code; I extracted the code from
doSnapshotTile
in its own method because it is called twice (on both sides of theif (height > maxTextureSize || width > maxTextureSize)
condition, actually), but this isn't the case here.I've got no strong feeling against it either, so I don't know; anybody else care to comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also don't have a strong opinion, so I'm OK with you leaving it as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine to leave as-is.