Don't clear render surfaces unnecessarily.

As an optimization, we used to clear render surfaces when they were
elided from the RenderSurfaceLayerList. It turns out that these surfaces
are still important from time to time; a scroll child will need to
access the transforms of these surfaces in order to put its clip in the
right space.

This CL retains the layer lists and it also updates RenderSurface to
own a LayerList rather than a RenderSurfaceLayerList (which was always
a bit of a kludge).

[email protected]
BUG=366386

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266519 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h
index 20b2163..ba5d579a 100644
--- a/cc/trees/layer_tree_host_common.h
+++ b/cc/trees/layer_tree_host_common.h
@@ -139,6 +139,11 @@
     return children[index];
   }
 
+  static LayerImpl* get_child_as_raw_ptr(const LayerImplList& children,
+                                         size_t index) {
+    return children[index];
+  }
+
   struct ScrollUpdateInfo {
     int layer_id;
     gfx::Vector2d scroll_delta;