| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 , m_suppressNextKeypressEvent(false) | 424 , m_suppressNextKeypressEvent(false) |
| 425 , m_imeAcceptEvents(true) | 425 , m_imeAcceptEvents(true) |
| 426 , m_operationsAllowed(WebDragOperationNone) | 426 , m_operationsAllowed(WebDragOperationNone) |
| 427 , m_dragOperation(WebDragOperationNone) | 427 , m_dragOperation(WebDragOperationNone) |
| 428 , m_devToolsEmulator(nullptr) | 428 , m_devToolsEmulator(nullptr) |
| 429 , m_isTransparent(false) | 429 , m_isTransparent(false) |
| 430 , m_tabsToLinks(false) | 430 , m_tabsToLinks(false) |
| 431 , m_layerTreeView(nullptr) | 431 , m_layerTreeView(nullptr) |
| 432 , m_rootLayer(nullptr) | 432 , m_rootLayer(nullptr) |
| 433 , m_rootGraphicsLayer(nullptr) | 433 , m_rootGraphicsLayer(nullptr) |
| 434 , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium(this))) | 434 , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium())) |
| 435 , m_matchesHeuristicsForGpuRasterization(false) | 435 , m_matchesHeuristicsForGpuRasterization(false) |
| 436 , m_flingModifier(0) | 436 , m_flingModifier(0) |
| 437 , m_flingSourceDevice(WebGestureDeviceUninitialized) | 437 , m_flingSourceDevice(WebGestureDeviceUninitialized) |
| 438 , m_fullscreenController(FullscreenController::create(this)) | 438 , m_fullscreenController(FullscreenController::create(this)) |
| 439 , m_showFPSCounter(false) | 439 , m_showFPSCounter(false) |
| 440 , m_baseBackgroundColor(Color::white) | 440 , m_baseBackgroundColor(Color::white) |
| 441 , m_backgroundColorOverride(Color::transparent) | 441 , m_backgroundColorOverride(Color::transparent) |
| 442 , m_zoomFactorOverride(0) | 442 , m_zoomFactorOverride(0) |
| 443 , m_userGestureObserved(false) | 443 , m_userGestureObserved(false) |
| 444 , m_shouldDispatchFirstVisuallyNonEmptyLayout(false) | 444 , m_shouldDispatchFirstVisuallyNonEmptyLayout(false) |
| (...skipping 3821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4266 if (!frame) | 4266 if (!frame) |
| 4267 return nullptr; | 4267 return nullptr; |
| 4268 | 4268 |
| 4269 Document* document = frame->frame()->document(); | 4269 Document* document = frame->frame()->document(); |
| 4270 if (!document || !document->layoutView()) | 4270 if (!document || !document->layoutView()) |
| 4271 return nullptr; | 4271 return nullptr; |
| 4272 | 4272 |
| 4273 return document->layoutView()->compositor(); | 4273 return document->layoutView()->compositor(); |
| 4274 } | 4274 } |
| 4275 | 4275 |
| 4276 void WebViewImpl::registerForAnimations(WebLayer* layer) | |
| 4277 { | |
| 4278 if (m_layerTreeView) | |
| 4279 m_layerTreeView->registerForAnimations(layer); | |
| 4280 } | |
| 4281 | |
| 4282 GraphicsLayer* WebViewImpl::rootGraphicsLayer() | 4276 GraphicsLayer* WebViewImpl::rootGraphicsLayer() |
| 4283 { | 4277 { |
| 4284 return m_rootGraphicsLayer; | 4278 return m_rootGraphicsLayer; |
| 4285 } | 4279 } |
| 4286 | 4280 |
| 4287 void WebViewImpl::scheduleAnimation() | 4281 void WebViewImpl::scheduleAnimation() |
| 4288 { | 4282 { |
| 4289 if (m_layerTreeView) { | 4283 if (m_layerTreeView) { |
| 4290 m_layerTreeView->setNeedsBeginFrame(); | 4284 m_layerTreeView->setNeedsBeginFrame(); |
| 4291 return; | 4285 return; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 4317 devTools->layerTreeViewChanged(m_layerTreeView); | 4311 devTools->layerTreeViewChanged(m_layerTreeView); |
| 4318 | 4312 |
| 4319 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); | 4313 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); |
| 4320 if (m_layerTreeView) | 4314 if (m_layerTreeView) |
| 4321 m_page->layerTreeViewInitialized(*m_layerTreeView); | 4315 m_page->layerTreeViewInitialized(*m_layerTreeView); |
| 4322 | 4316 |
| 4323 // FIXME: only unittests, click to play, Android printing, and printing (for
headers and footers) | 4317 // FIXME: only unittests, click to play, Android printing, and printing (for
headers and footers) |
| 4324 // make this assert necessary. We should make them not hit this code and the
n delete allowsBrokenNullLayerTreeView. | 4318 // make this assert necessary. We should make them not hit this code and the
n delete allowsBrokenNullLayerTreeView. |
| 4325 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi
ew()); | 4319 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi
ew()); |
| 4326 | 4320 |
| 4327 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor
m::current()->isThreadedAnimationEnabled() && m_layerTreeView) { | 4321 if (Platform::current()->isThreadedAnimationEnabled() && m_layerTreeView) { |
| 4328 m_linkHighlightsTimeline = adoptPtr(CompositorFactory::current().createA
nimationTimeline()); | 4322 m_linkHighlightsTimeline = adoptPtr(CompositorFactory::current().createA
nimationTimeline()); |
| 4329 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); | 4323 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); |
| 4330 } | 4324 } |
| 4331 | 4325 |
| 4332 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 4326 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
| 4333 attachPaintArtifactCompositor(); | 4327 attachPaintArtifactCompositor(); |
| 4334 } | 4328 } |
| 4335 | 4329 |
| 4336 void WebViewImpl::applyViewportDeltas( | 4330 void WebViewImpl::applyViewportDeltas( |
| 4337 const WebFloatSize& visualViewportDelta, | 4331 const WebFloatSize& visualViewportDelta, |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4580 { | 4574 { |
| 4581 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4575 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4582 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4576 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4583 if (!page()) | 4577 if (!page()) |
| 4584 return 1; | 4578 return 1; |
| 4585 | 4579 |
| 4586 return page()->deviceScaleFactor(); | 4580 return page()->deviceScaleFactor(); |
| 4587 } | 4581 } |
| 4588 | 4582 |
| 4589 } // namespace blink | 4583 } // namespace blink |
| OLD | NEW |