Own canvas async work and thin NodeCanvas composite
This commit is contained in:
@@ -175,6 +175,20 @@ struct LegacyCanvasDrawMergeFinalPlaneCompositeExecution {
|
||||
std::function<void()> unbind_merged_texture;
|
||||
};
|
||||
|
||||
struct LegacyCanvasDrawMergeCacheToScreenCompositeUniforms {
|
||||
LegacyCanvasDrawMergeCheckerboardUniforms checkerboard;
|
||||
LegacyCanvasDrawMergeTextureUniforms texture;
|
||||
};
|
||||
|
||||
struct LegacyCanvasDrawMergeCacheToScreenCompositeExecution {
|
||||
std::function<void()> enable_blend;
|
||||
std::function<void(const LegacyCanvasDrawMergeCheckerboardUniforms&, int)> draw_checkerboard_plane;
|
||||
std::function<void()> bind_sampler;
|
||||
std::function<void()> bind_cache_texture;
|
||||
std::function<void()> draw_cache_texture;
|
||||
std::function<void()> unbind_cache_texture;
|
||||
};
|
||||
|
||||
struct LegacyCanvasDrawMergeDisplayResolveUniforms {
|
||||
LegacyCanvasDrawMergeTextureUniforms texture;
|
||||
};
|
||||
@@ -447,6 +461,23 @@ inline void execute_legacy_canvas_draw_merge_final_plane_composite(
|
||||
execution.unbind_merged_texture();
|
||||
}
|
||||
|
||||
inline void execute_legacy_canvas_draw_merge_cache_to_screen_composite(
|
||||
const LegacyCanvasDrawMergeCacheToScreenCompositeUniforms& uniforms,
|
||||
const LegacyCanvasDrawMergeCacheToScreenCompositeExecution& execution)
|
||||
{
|
||||
execution.enable_blend();
|
||||
|
||||
for (int plane_index = 0; plane_index < 6; ++plane_index) {
|
||||
execution.draw_checkerboard_plane(uniforms.checkerboard, plane_index);
|
||||
}
|
||||
|
||||
execution.bind_sampler();
|
||||
execution.bind_cache_texture();
|
||||
setup_legacy_canvas_draw_merge_texture_shader(uniforms.texture);
|
||||
execution.draw_cache_texture();
|
||||
execution.unbind_cache_texture();
|
||||
}
|
||||
|
||||
inline void execute_legacy_canvas_draw_merge_display_resolve(
|
||||
const LegacyCanvasDrawMergeDisplayResolveUniforms& uniforms,
|
||||
const LegacyCanvasDrawMergeDisplayResolveExecution& execution)
|
||||
|
||||
Reference in New Issue
Block a user