viz: Safe downcast from OutputSurface to SkiaOutputSurface

We need to instantiate Display with both OutputSurface and an equivalent
pointer to SkiaOutputSurface.  This CL provides a way to safely downcast
from an OutputSurface to SkiaOutputSurface to decouple the creation of
OutputSurface and Display in preparation for upcoming CLs.

Bug: 953970
Change-Id: I7d25d980e208ccb39aa3f4e0eee3b9a662ccd502
Commit-Queue: Sunny Sachanandani <>
Reviewed-by: Bo <>
Reviewed-by: kylechar <>
Cr-Commit-Position: refs/heads/master@{#654161}
9 files changed