Bug 366471 - Improve OSX scroll performance with drawText caching

Add caching to GC.drawText to prevent multiple calls with the same
single
character from needed to perform expensive layout operations. Any call
to
GC.drawText() that is rendering a single character on a transparent
background is now a cache candidate.

The cache is limited to 20 items and is specifically designed to work
well
with classes such as WhitespaceCharacterPainter which frequently call
drawText() but operate with a relatively small set of characters.

Change-Id: I0ac4e3478e212ba5e410c5a06a6827279143f7be
Also-by: Karsten Thoms <karsten.thoms@itemis.de>
Signed-off-by: Phillip Webb <pwebb@pivotal.io>
1 file changed
tree: 949659c1d5eb5a14830b64b3a8609d17af6bc842
  1. bundles/
  2. examples/
  3. features/
  4. local-build/
  5. tests/
  6. .gitignore
  7. CONTRIBUTING
  8. LICENSE
  9. NOTICE
  10. pom.xml
  11. README.md
README.md

Contributing to SWT

Thanks for your interest in this project.

Developer resources:

See the following description for how to contribute a feature or a bug fix to SWT.

Information regarding source code management, builds, coding standards, and more and be found under the following link.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).

Contact:

Contact the project developers via the project's “dev” list.

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!