Commit 2d0fb0f4 authored by junov@chromium.org's avatar junov@chromium.org

Improve gpu texture recycling in Canvas2DLayerBridge.

Changing the allocation of the initaial SkSurface in
Canvas2DLayerBridge so that it may be taken from the GrContext
texture pool. This should improve performance for apps that
rely heavily on transient canvas objects.

BUG=351798

Review URL: https://codereview.chromium.org/196833006

git-svn-id: svn://svn.chromium.org/blink/trunk@169856 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 087f2421
......@@ -62,7 +62,7 @@ static PassRefPtr<SkSurface> createSkSurface(GrContext* gr, const IntSize& size,
info.fHeight = size.height();
info.fColorType = kPMColor_SkColorType;
info.fAlphaType = kPremul_SkAlphaType;
return adoptRef(SkSurface::NewRenderTarget(gr, info, msaaSampleCount));
return adoptRef(SkSurface::NewScratchRenderTarget(gr, info, msaaSampleCount));
}
PassRefPtr<Canvas2DLayerBridge> Canvas2DLayerBridge::create(const IntSize& size, OpacityMode opacityMode, int msaaSampleCount)
......
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