On 14 March 2016 at 14:21, Józef Kucia joseph.kucia@gmail.com wrote:
This change allows to make surface_color_fill() static and internal to surface.c. If we want we may also get rid of surface_depth_fill() and surface_color_fill() as they are merely simple wrappers around wined3d_rendertarget_view_clear().
They'll likely go away one way or another in the end. E.g. the main reason surface_color_fill() still has for existing is to implement WINED3D_BLT_COLOR_FILL, but that should probably just be handled by calling wined3d_device_clear_rendertarget_view() from ddraw.
However, the main idea behind this change is to put the implementation of render target view clears in wined3d_rendertarget_view_clear() and call it from a wined3d_cs_op_handler for WINED3D_CS_OP_CLEAR_RENDERTARGET_VIEW. wined3d_device_clear_rendertarget_view() would just emit WINED3D_CS_OP_CLEAR_RENDERTARGET_VIEW.
It doesn't look so complicated that it couldn't just be in the op handler. It's not clear that there's necessarily going to be a WINED3D_CS_OP_CLEAR_RENDERTARGET_VIEW though, it may just as well end up getting handled as part of WINED3D_CS_OP_CLEAR.