Extract Canvas draw_merge layer texture helper
This commit is contained in:
@@ -80,6 +80,13 @@ struct LegacyCanvasDrawMergeLayerBlendExecution {
|
||||
std::function<void()> unbind_merge_texture;
|
||||
};
|
||||
|
||||
struct LegacyCanvasDrawMergeLayerTextureExecution {
|
||||
std::function<void()> bind_sampler;
|
||||
std::function<void()> bind_layer_texture;
|
||||
std::function<void()> draw;
|
||||
std::function<void()> unbind_layer_texture;
|
||||
};
|
||||
|
||||
struct LegacyCanvasDrawMergeFinalPlaneCompositeUniforms {
|
||||
LegacyCanvasDrawMergeCheckerboardUniforms checkerboard;
|
||||
LegacyCanvasDrawMergeTextureUniforms texture;
|
||||
@@ -273,6 +280,17 @@ inline void execute_legacy_canvas_draw_merge_layer_blend(
|
||||
execution.unbind_merge_texture();
|
||||
}
|
||||
|
||||
inline void execute_legacy_canvas_draw_merge_layer_texture(
|
||||
const LegacyCanvasDrawMergeTextureAlphaUniforms& uniforms,
|
||||
const LegacyCanvasDrawMergeLayerTextureExecution& execution)
|
||||
{
|
||||
execution.bind_sampler();
|
||||
setup_legacy_canvas_draw_merge_texture_alpha_shader(uniforms);
|
||||
execution.bind_layer_texture();
|
||||
execution.draw();
|
||||
execution.unbind_layer_texture();
|
||||
}
|
||||
|
||||
inline void execute_legacy_canvas_draw_merge_final_plane_composite(
|
||||
const LegacyCanvasDrawMergeFinalPlaneCompositeUniforms& uniforms,
|
||||
const LegacyCanvasDrawMergeFinalPlaneCompositeExecution& execution)
|
||||
|
||||
Reference in New Issue
Block a user