| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 #include "core/page/TouchDisambiguation.h" | 89 #include "core/page/TouchDisambiguation.h" |
| 90 #include "core/paint/PaintLayer.h" | 90 #include "core/paint/PaintLayer.h" |
| 91 #include "core/timing/DOMWindowPerformance.h" | 91 #include "core/timing/DOMWindowPerformance.h" |
| 92 #include "core/timing/Performance.h" | 92 #include "core/timing/Performance.h" |
| 93 #include "modules/accessibility/AXObject.h" | 93 #include "modules/accessibility/AXObject.h" |
| 94 #include "modules/accessibility/AXObjectCacheImpl.h" | 94 #include "modules/accessibility/AXObjectCacheImpl.h" |
| 95 #include "modules/credentialmanager/CredentialManagerClient.h" | 95 #include "modules/credentialmanager/CredentialManagerClient.h" |
| 96 #include "modules/encryptedmedia/MediaKeysController.h" | 96 #include "modules/encryptedmedia/MediaKeysController.h" |
| 97 #include "modules/storage/StorageNamespaceController.h" | 97 #include "modules/storage/StorageNamespaceController.h" |
| 98 #include "modules/webgl/WebGLRenderingContext.h" | 98 #include "modules/webgl/WebGLRenderingContext.h" |
| 99 #include "platform/CompositorFactory.h" |
| 99 #include "platform/ContextMenu.h" | 100 #include "platform/ContextMenu.h" |
| 100 #include "platform/ContextMenuItem.h" | 101 #include "platform/ContextMenuItem.h" |
| 101 #include "platform/Cursor.h" | 102 #include "platform/Cursor.h" |
| 102 #include "platform/KeyboardCodes.h" | 103 #include "platform/KeyboardCodes.h" |
| 103 #include "platform/Logging.h" | 104 #include "platform/Logging.h" |
| 104 #include "platform/NotImplemented.h" | 105 #include "platform/NotImplemented.h" |
| 105 #include "platform/PlatformGestureEvent.h" | 106 #include "platform/PlatformGestureEvent.h" |
| 106 #include "platform/PlatformKeyboardEvent.h" | 107 #include "platform/PlatformKeyboardEvent.h" |
| 107 #include "platform/PlatformMouseEvent.h" | 108 #include "platform/PlatformMouseEvent.h" |
| 108 #include "platform/RuntimeEnabledFeatures.h" | 109 #include "platform/RuntimeEnabledFeatures.h" |
| (...skipping 4231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4340 void WebViewImpl::scheduleAnimation() | 4341 void WebViewImpl::scheduleAnimation() |
| 4341 { | 4342 { |
| 4342 if (m_layerTreeView) { | 4343 if (m_layerTreeView) { |
| 4343 m_layerTreeView->setNeedsBeginFrame(); | 4344 m_layerTreeView->setNeedsBeginFrame(); |
| 4344 return; | 4345 return; |
| 4345 } | 4346 } |
| 4346 if (m_client) | 4347 if (m_client) |
| 4347 m_client->scheduleAnimation(); | 4348 m_client->scheduleAnimation(); |
| 4348 } | 4349 } |
| 4349 | 4350 |
| 4350 void WebViewImpl::attachCompositorAnimationTimeline(WebCompositorAnimationTimeli
ne* timeline) | 4351 void WebViewImpl::attachCompositorAnimationTimeline(CompositorAnimationTimeline*
timeline) |
| 4351 { | 4352 { |
| 4352 if (m_layerTreeView) | 4353 if (m_layerTreeView) |
| 4353 m_layerTreeView->attachCompositorAnimationTimeline(timeline); | 4354 m_layerTreeView->attachCompositorAnimationTimeline(timeline->animationTi
meline()); |
| 4354 } | 4355 } |
| 4355 | 4356 |
| 4356 void WebViewImpl::detachCompositorAnimationTimeline(WebCompositorAnimationTimeli
ne* timeline) | 4357 void WebViewImpl::detachCompositorAnimationTimeline(CompositorAnimationTimeline*
timeline) |
| 4357 { | 4358 { |
| 4358 if (m_layerTreeView) | 4359 if (m_layerTreeView) |
| 4359 m_layerTreeView->detachCompositorAnimationTimeline(timeline); | 4360 m_layerTreeView->detachCompositorAnimationTimeline(timeline->animationTi
meline()); |
| 4360 } | 4361 } |
| 4361 | 4362 |
| 4362 void WebViewImpl::initializeLayerTreeView() | 4363 void WebViewImpl::initializeLayerTreeView() |
| 4363 { | 4364 { |
| 4364 if (m_client) { | 4365 if (m_client) { |
| 4365 m_client->initializeLayerTreeView(); | 4366 m_client->initializeLayerTreeView(); |
| 4366 m_layerTreeView = m_client->layerTreeView(); | 4367 m_layerTreeView = m_client->layerTreeView(); |
| 4367 } | 4368 } |
| 4368 | 4369 |
| 4369 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) | 4370 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) |
| 4370 devTools->layerTreeViewChanged(m_layerTreeView); | 4371 devTools->layerTreeViewChanged(m_layerTreeView); |
| 4371 | 4372 |
| 4372 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); | 4373 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); |
| 4373 if (m_layerTreeView) | 4374 if (m_layerTreeView) |
| 4374 m_page->layerTreeViewInitialized(*m_layerTreeView); | 4375 m_page->layerTreeViewInitialized(*m_layerTreeView); |
| 4375 | 4376 |
| 4376 // FIXME: only unittests, click to play, Android printing, and printing (for
headers and footers) | 4377 // FIXME: only unittests, click to play, Android printing, and printing (for
headers and footers) |
| 4377 // make this assert necessary. We should make them not hit this code and the
n delete allowsBrokenNullLayerTreeView. | 4378 // make this assert necessary. We should make them not hit this code and the
n delete allowsBrokenNullLayerTreeView. |
| 4378 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi
ew()); | 4379 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi
ew()); |
| 4379 | 4380 |
| 4380 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor
m::current()->isThreadedAnimationEnabled() && m_layerTreeView) { | 4381 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor
m::current()->isThreadedAnimationEnabled() && m_layerTreeView) { |
| 4381 ASSERT(Platform::current()->compositorSupport()); | 4382 m_linkHighlightsTimeline = adoptPtr(CompositorFactory::current().createA
nimationTimeline()); |
| 4382 m_linkHighlightsTimeline = adoptPtr(Platform::current()->compositorSuppo
rt()->createAnimationTimeline()); | |
| 4383 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); | 4383 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); |
| 4384 } | 4384 } |
| 4385 | 4385 |
| 4386 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 4386 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
| 4387 attachPaintArtifactCompositor(); | 4387 attachPaintArtifactCompositor(); |
| 4388 } | 4388 } |
| 4389 | 4389 |
| 4390 void WebViewImpl::applyViewportDeltas( | 4390 void WebViewImpl::applyViewportDeltas( |
| 4391 const WebFloatSize& visualViewportDelta, | 4391 const WebFloatSize& visualViewportDelta, |
| 4392 const WebFloatSize& layoutViewportDelta, | 4392 const WebFloatSize& layoutViewportDelta, |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4630 { | 4630 { |
| 4631 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4631 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4632 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4632 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4633 if (!page()) | 4633 if (!page()) |
| 4634 return 1; | 4634 return 1; |
| 4635 | 4635 |
| 4636 return page()->deviceScaleFactor(); | 4636 return page()->deviceScaleFactor(); |
| 4637 } | 4637 } |
| 4638 | 4638 |
| 4639 } // namespace blink | 4639 } // namespace blink |
| OLD | NEW |