RFR: 8092272: [D3D 3D] Need a robust 3D states management for texture [v2]

Nir Lisker nlisker at openjdk.org
Wed Nov 15 13:10:45 UTC 2023


On Thu, 9 Nov 2023 02:45:34 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> Nir Lisker has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Addressed review comments
>
> modules/javafx.graphics/src/main/native-prism-d3d/D3DPhongMaterial.cc line 39:
> 
>> 37:     for (int i = 0; i < map_type::num_map_types; i++) {
>> 38:         map[i] = NULL;
>> 39:     }
> 
> The size of the array is statically known, you could use `memset(map, 0, sizeof(map))` (or, if you use `std::array`, it's simply `map.fill(NULL)`). However, why is there a destructor at all? It doesn't seem to do anything useful.

There is all sorts of unused code in the native layer. I think that there are whole classes that aren't needed. It will require another PR.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1281#discussion_r1394176878


More information about the openjfx-dev mailing list