Commit d877833c authored by Peng Huang's avatar Peng Huang Committed by Commit Bot

Fix mac memory regression for https://crrev.com/c/2030627

Mac promotes all render passes to CALayer, so we don't need to redraw
the main surface.

Bug: 1048997,1044678
Change-Id: Iefef04a00ff60df882877b5930c90bcc8057e485
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2039335
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#739285}
parent 798e2dfe
......@@ -381,8 +381,16 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order,
: gfx::BufferFormat::RGBX_8888,
reshape_use_stencil_);
#if defined(OS_MACOSX)
// For Mac, all render passes will be promoted to CALayer, the redraw full
// frame is for the main surface only.
// TODO(penghuang): verify this logic with SkiaRenderer.
if (!output_surface_->capabilities().supports_surfaceless)
needs_full_frame_redraw = true;
#else
// The entire surface has to be redrawn if reshape is requested.
needs_full_frame_redraw = true;
#endif
}
#if defined(OS_WIN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment