[Impeller] Fix memory leak I introduced by fixing memory leak. (flutter/engine#55087)
If we don't reset host buffer then leak
This commit is contained in:
@@ -141,7 +141,7 @@ std::unique_ptr<SurfaceFrame> GPUSurfaceGLImpeller::AcquireFrame(
|
||||
auto picture = impeller_dispatcher.EndRecordingAsPicture();
|
||||
|
||||
return aiks_context->Render(picture, render_target,
|
||||
/*reset_host_buffer=*/false);
|
||||
/*reset_host_buffer=*/true);
|
||||
|
||||
#endif // EXPERIMENTAL_CANVAS
|
||||
};
|
||||
|
||||
@@ -320,9 +320,9 @@ std::unique_ptr<SurfaceFrame> GPUSurfaceMetalImpeller::AcquireFrameFromMTLTextur
|
||||
display_list->Dispatch(impeller_dispatcher, sk_cull_rect);
|
||||
auto picture = impeller_dispatcher.EndRecordingAsPicture();
|
||||
|
||||
const bool reset_host_buffer = surface_frame.submit_info().frame_boundary;
|
||||
const impeller::RenderTarget& render_target = surface->GetTargetRenderPassDescriptor();
|
||||
bool render_result = aiks_context->Render(picture, render_target, reset_host_buffer);
|
||||
bool render_result =
|
||||
aiks_context->Render(picture, render_target, /*reset_host_buffer=*/true);
|
||||
#endif
|
||||
if (!render_result) {
|
||||
FML_LOG(ERROR) << "Failed to render Impeller frame";
|
||||
|
||||
@@ -103,7 +103,7 @@ std::unique_ptr<SurfaceFrame> GPUSurfaceVulkanImpeller::AcquireFrame(
|
||||
SkIRect::MakeWH(cull_rect.width, cull_rect.height));
|
||||
auto picture = impeller_dispatcher.EndRecordingAsPicture();
|
||||
return aiks_context->Render(picture, render_target,
|
||||
/*reset_host_buffer=*/false);
|
||||
/*reset_host_buffer=*/true);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user