Commit 4f50ca9
committed
[Win32] Ensure Image#getImageData() returns no internal data
A caching mechanism for ImageData introduced to some provider
implementations inside the Image class leads to Image#getImageData()
returning an ImageData object, which if modified affects the underlying
Image. This contradicts the contract of that method, which states that
changes to that object will not affect the Image.
This change ensures that Image#getImagetData() only returns objects that
are not used internal of the Image instance. To this end, clones of the
ImageData are created where necessary.1 parent a641cdb commit 4f50ca9
File tree
2 files changed
+22
-2
lines changed- bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics
- tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit
2 files changed
+22
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2017 | 2017 | | |
2018 | 2018 | | |
2019 | 2019 | | |
2020 | | - | |
| 2020 | + | |
2021 | 2021 | | |
2022 | 2022 | | |
2023 | 2023 | | |
| |||
2297 | 2297 | | |
2298 | 2298 | | |
2299 | 2299 | | |
2300 | | - | |
| 2300 | + | |
2301 | 2301 | | |
2302 | 2302 | | |
2303 | 2303 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
683 | 684 | | |
684 | 685 | | |
685 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
686 | 706 | | |
687 | 707 | | |
688 | 708 | | |
| |||
0 commit comments