Bug 266532 - [GMF] ColorsAndFontsPropertySection creates image garbage
Summary: [GMF] ColorsAndFontsPropertySection creates image garbage
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.2   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: ---   Edit
Assignee: Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 200120
Blocks:
  Show dependency tree
 
Reported: 2009-02-27 13:26 EST by Marc Gobeil CLA
Modified: 2010-11-14 11:25 EST (History)
2 users (show)

See Also:


Attachments
patch fix for ColorsAndFontsPropertySection (11.91 KB, patch)
2009-02-27 13:26 EST, Marc Gobeil CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Gobeil CLA 2009-02-27 13:26:30 EST
Created attachment 127029 [details]
patch fix for ColorsAndFontsPropertySection 

Build ID: I20081211-1908

Steps To Reproduce:
1. run profiler on diagram while creating and moving around objects

More information:
At the beginning of ColorsAndFontsPropertySection.refresh() it refreshes the image on its line and font color buttons.

It did so by calling ImageDescriptor.getImageData(), which creates a new image data structure every call, on a static final ImageDescriptor that never changes, then created a new image from it based on the font color, which probably hasn't change since the last refresh call, and did all this twice, once for the font color, then again for the line color.

I simply introduced a flag to track whether the respective colors have changed since the last refresh.  I didn't figure it was worth caching the ImageData for the few times the color has actually changed.

While I was in the area, I added generics to eliminate all but one of the warnings in this class.
Comment 1 Mariot Chauvin CLA 2009-09-30 04:56:20 EDT
Seems to be quite the same issue as bug 200120
Comment 2 Eclipse Webmaster CLA 2010-07-19 21:58:51 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime was the original product and component for this bug