-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=58834 Patch by James Robinson <jamesr@chromium.org> on 2011-08-18 Reviewed by Darin Fisher. Source/WebCore: Handle the root or non-composited content with a GraphicsLayer rather than special case logic in LayerRendererChromium. This layer's client is the NonCompositedContentHost, which routes the paint callbacks through the LayerPainterChromium interface out to the WebView. The root layer is special in two ways: *) The root layer has a scroll offset, which changes how the visibleLayerRect maps to content space and applies a draw-time transform. *) The root layer masks the alpha channel when drawing because of concerns about subpixel AA trashing the alpha channel. The root layer is always opaque so this is fine. *) The root layer does not have border texels and does have subpixel AA for text. Covered by compositing/ * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::scrollPosition): (WebCore::LayerChromium::setScrollPosition): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::viewportChanged): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getFramebufferPixels): (WebCore::LayerRendererChromium::cleanupSharedObjects): (WebCore::LayerRendererChromium::layerTreeAsText): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::rootLayer): (WebCore::LayerRendererChromium::viewportSize): (WebCore::LayerRendererChromium::viewportWidth): (WebCore::LayerRendererChromium::viewportHeight): * platform/graphics/chromium/NonCompositedContentHost.cpp: Added. (WebCore::NonCompositedContentHost::NonCompositedContentHost): (WebCore::NonCompositedContentHost::~NonCompositedContentHost): (WebCore::NonCompositedContentHost::invalidateRect): (WebCore::NonCompositedContentHost::invalidateEntireLayer): (WebCore::NonCompositedContentHost::setScrollPosition): (WebCore::NonCompositedContentHost::notifyAnimationStarted): (WebCore::NonCompositedContentHost::notifySyncRequired): (WebCore::NonCompositedContentHost::paintContents): (WebCore::NonCompositedContentHost::showDebugBorders): (WebCore::NonCompositedContentHost::showRepaintCounter): * platform/graphics/chromium/NonCompositedContentHost.h: Added. (WebCore::NonCompositedContentHost::create): (WebCore::NonCompositedContentHost::graphicsLayer): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::scrollPosition): (WebCore::CCLayerImpl::setScrollPosition): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::invalidateRootLayerRect): (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::reallocateRenderer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::rootLayer): (WebCore::CCLayerTreeHost::viewportSize): Source/WebKit/chromium: * src/WebViewImpl.cpp: (WebKit::WebViewImpl::paint): (WebKit::WebViewImpl::setRootGraphicsLayer): (WebKit::WebViewImpl::didRecreateGraphicsContext): (WebKit::WebViewImpl::updateLayerTreeViewport): * src/WebViewImpl.h: LayoutTests: Update pixel baselines that changes due to subtle blending differences, primarily on scrollbars. I don't know why these keep changing. * compositing/checkerboard-expected.png: * platform/chromium-gpu-linux/compositing/direct-image-compositing-expected.png: * platform/chromium-gpu-linux/compositing/geometry/fixed-in-composited-expected.png: * platform/chromium-gpu-linux/compositing/geometry/horizontal-scroll-composited-expected.png: * platform/chromium-gpu-linux/compositing/geometry/tall-page-composited-expected.png: * platform/chromium-gpu-linux/compositing/geometry/video-fixed-scrolling-expected.png: * platform/chromium-gpu-linux/compositing/images/direct-image-background-color-expected.png: * platform/chromium-gpu-linux/compositing/layers-inside-overflow-scroll-expected.png: * platform/chromium-gpu-linux/compositing/masks/masked-ancestor-expected.png: * platform/chromium-gpu-linux/compositing/masks/simple-composited-mask-expected.png: * platform/chromium-gpu-linux/compositing/overflow/overflow-scroll-expected.png: * platform/chromium-gpu-linux/compositing/self-painting-layers-expected.png: * platform/chromium-gpu-linux/compositing/webgl/webgl-background-color-expected.png: * platform/chromium-gpu-linux/fast/canvas/canvas-text-alignment-expected.png: * platform/chromium-gpu-linux/fast/canvas/image-object-in-canvas-expected.png: * platform/chromium-gpu-linux/media/video-zoom-expected.png: * platform/chromium-gpu-linux/platform/chromium/compositing/layout-width-change-expected.png: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@93329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
acdbafa5