-
cmarrin@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=28018 This hooks everything up and provides a working implementation of Canvas 3D. I plumb the creation of the 3D canvas down to GraphicsLayer, passing the opaque context and texture pointers so a Canvas3DLayer can be created (more on that later). It also plumbs changes to the 3D canvas so that Canvas3DLayer can recomposite the results. A 3D Canvas element needs a RenderLayer and compositing layer to render. This is because it renders to an off-screen texture in the GPU and then hands it to a Canvas3DLayer, which is a subclass of CAOpenGLLayer, to render that texture as a 3D quad. This keeps everything in GPU memory to maximize performance. When a CanvasRenderingContext3D is created it forces a style recalc which creates the RenderLayer and compositing layer if needed. I repurposed an existing flag which was put in place for animation to accomplish this. This flag is passed to setNeedsStyleRecalc(), and I renamed it from AnimationStyleChange to SyntheticStyleChange. It essentially says that you need to do a complete style recalc, even though the style itself has not really changed. This patch also fixes a couple of bugs discovered when testing with 3d-canvas turned on. I also added a constructor DOMWindow.idl for CanvasRenderingContext3D. This is needed when making a JS wrapper for the object so the prototype property can be set. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4e7728f4