[chromecast] SurfaceFactoryCast should create NULL surface/canvas |
||
Issue descriptionSurfaceFactoryCast::CreateCanvasForWidget creates surface backed by a real 720p bitmap which consumes 3.6M. This bitmap is never shown, so we may save this memory by creating an SkNullCanvas. It would not consume any memory and draw calls would be much faster. We need to add an SkNullSurface that vends SkNullCanvas.
,
Jun 28 2017
Yes - it is fine to return null from makeImageSnapshot
,
Jun 28 2017
I'll take a crack at adding this
,
Jun 29 2017
The following revision refers to this bug: https://skia.googlesource.com/skia/+/44d04bd7ed3be8c39cc7ea02e3789cccf083bb55 commit 44d04bd7ed3be8c39cc7ea02e3789cccf083bb55 Author: Mike Reed <reed@google.com> Date: Thu Jun 29 12:14:53 2017 add null-surface Bug: crbug.com/737726 Change-Id: Iec9094d8d7232943e90fe2d9745fc83bcdf90954 Reviewed-on: https://skia-review.googlesource.com/21190 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Mike Reed <reed@google.com> [modify] https://crrev.com/44d04bd7ed3be8c39cc7ea02e3789cccf083bb55/src/image/SkSurface.cpp [modify] https://crrev.com/44d04bd7ed3be8c39cc7ea02e3789cccf083bb55/include/core/SkSurface.h [modify] https://crrev.com/44d04bd7ed3be8c39cc7ea02e3789cccf083bb55/tests/SurfaceTest.cpp
,
Jul 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f0e03cff8b74271d63e44f3154a86408fc5f42f9 commit f0e03cff8b74271d63e44f3154a86408fc5f42f9 Author: Alok Priyadarshi <alokp@chromium.org> Date: Mon Jul 31 20:41:13 2017 [chromecast] Use null SkSurface instead of bitmap-backed one. On audio-only devices there is no need to perform rasterization for real. We just need a dummy SkSurface that simply ignores all draw calls. Using the null surface saves 3.6M memory and draw calls are much faster. Bug: 737726 Change-Id: Ic11ee7afc80dd71a6ae5d5d2ba5e4aae513fcb61 Reviewed-on: https://chromium-review.googlesource.com/594643 Reviewed-by: Luke Halliwell <halliwell@chromium.org> Commit-Queue: Alok Priyadarshi <alokp@chromium.org> Cr-Commit-Position: refs/heads/master@{#490794} [modify] https://crrev.com/f0e03cff8b74271d63e44f3154a86408fc5f42f9/ui/ozone/platform/cast/surface_factory_cast.cc
,
Jul 31 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by reed@google.com
, Jun 28 2017