-
Notifications
You must be signed in to change notification settings - Fork 195
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
Feature Proposal: Rasterization of SVGs at Runtime for Eclipse Icons #2593
base: master
Are you sure you want to change the base?
Conversation
I just pushed the changes I made for/in our yesterdays 1:1 meeting, mainly adapt to the change that |
try (InputStream in = getStream(tempURL)) { | ||
if (rasterizer.isSVGFile(in)) { |
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.
If we would just check the file-extension here we would save creating an InputStream
for each image to render. The latter is probably a significant performance overhead.
Furthermore it would save us from making SVGRasterizerRegistry
and SVGRasterizer
public.
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.
Please see my comment.
We could nevertheless change the isSVGFile() call in Platform UI to a file-extension check. This way the method can't be deleted but SVGRasterizerRegistry
and SVGRasterizer
could be internal.
Edit: How can we make SVGRasterizer
internal? It is implemented by JSVGRasterizer
so it must be visible.
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 made SVGRasterizerRegistry
internal and changed isSVGFile to a file-extension check.
I removed the added SVGs from this PR. Please see the new PR for the SVGs if you want to test this feature. In the meantime I locally changed all PNGs I could find in Platform UI, Platform, JDT UI and SWT for testing the Performance. I had no problems whatsoever when starting Eclipse and it was also quite easy and fast to add the SVGs and change the paths. I did not delete any PNGs in this process but changed ".png" to ".svg" in most places. I will report the performance data soon. |
6084260
to
ced1410
Compare
ced1410
to
27e477f
Compare
@@ -236,6 +236,7 @@ private static final void declareImages() { | |||
declareImage(ISharedImages.IMG_DEF_VIEW, PATH_EVIEW + "defaultview_misc.png", true); //$NON-NLS-1$ | |||
|
|||
declareImage(IWorkbenchGraphicConstants.IMG_LCL_CLOSE_VIEW, PATH_ELOCALTOOL + "close_view.png", true); //$NON-NLS-1$ | |||
declareImage(IWorkbenchGraphicConstants.IMG_LCL_PIN_VIEW, PATH_ELOCALTOOL + "pin_view.png", true); //$NON-NLS-1$ |
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.
This change seems unrelated to the topic of this PR.
If this is an unintended left-over please remove it, if it's missing please add it in a separate PR.
declareImage(IWorkbenchGraphicConstants.IMG_LCL_PIN_VIEW, PATH_ELOCALTOOL + "pin_view.png", true); //$NON-NLS-1$ | |
declareImage(IWorkbenchGraphicConstants.IMG_LCL_PIN_VIEW, PATH_ELOCALTOOL + "pin_view.png", true); //$NON-NLS-1$ |
org.eclipse.search org.eclipse.ui org.eclipse.ui.ide org.eclipse.ui.ide.application org.eclipse.ui.editors org.eclipse.ui.navigator
This reverts commit 284f5da.
27e477f
to
4761d73
Compare
See the following PR in Eclipse SWT for a detailed description of the changes.
Fixes eclipse-platform/eclipse.platform.swt#1438.