diff options
Diffstat (limited to 'cc/layer_tree_host_impl.cc')
-rw-r--r-- | cc/layer_tree_host_impl.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc index 9c217b0..142839a 100644 --- a/cc/layer_tree_host_impl.cc +++ b/cc/layer_tree_host_impl.cc @@ -860,19 +860,20 @@ void LayerTreeHostImpl::OnCanDrawStateChangedForTree(LayerTreeImpl*) CompositorFrameMetadata LayerTreeHostImpl::makeCompositorFrameMetadata() const { - if (!rootScrollLayer()) - return CompositorFrameMetadata(); - CompositorFrameMetadata metadata; - metadata.root_scroll_offset = rootScrollLayer()->scrollOffset() + rootScrollLayer()->scrollDelta(); - if (!m_settings.pageScalePinchZoomEnabled) - metadata.root_scroll_offset.Scale(1 / m_pinchZoomViewport.pageScaleFactor()); metadata.page_scale_factor = m_pinchZoomViewport.totalPageScaleFactor(); metadata.viewport_size = m_pinchZoomViewport.bounds().size(); metadata.root_layer_size = contentSize(); metadata.min_page_scale_factor = m_pinchZoomViewport.minPageScaleFactor(); metadata.max_page_scale_factor = m_pinchZoomViewport.maxPageScaleFactor(); + if (!rootScrollLayer()) + return metadata; + + metadata.root_scroll_offset = rootScrollLayer()->scrollOffset() + rootScrollLayer()->scrollDelta(); + if (!m_settings.pageScalePinchZoomEnabled) + metadata.root_scroll_offset.Scale(1 / m_pinchZoomViewport.pageScaleFactor()); + return metadata; } @@ -1077,7 +1078,7 @@ bool LayerTreeHostImpl::initializeRenderer(scoped_ptr<OutputSurface> outputSurfa m_tileManager.reset(new TileManager(this, resourceProvider.get(), m_settings.numRasterThreads)); if (outputSurface->Capabilities().has_parent_compositor) - m_renderer = DelegatingRenderer::Create(this, resourceProvider.get()); + m_renderer = DelegatingRenderer::Create(this, outputSurface.get(), resourceProvider.get()); else if (outputSurface->Context3D()) m_renderer = GLRenderer::create(this, outputSurface.get(), resourceProvider.get()); else if (outputSurface->SoftwareDevice()) |