| 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 4237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4346 m_layerTreeView->setNeedsBeginFrame(); | 4347 m_layerTreeView->setNeedsBeginFrame(); |
| 4347 return; | 4348 return; |
| 4348 } | 4349 } |
| 4349 if (m_client) | 4350 if (m_client) |
| 4350 m_client->scheduleAnimation(); | 4351 m_client->scheduleAnimation(); |
| 4351 } | 4352 } |
| 4352 | 4353 |
| 4353 void WebViewImpl::attachCompositorAnimationTimeline(WebCompositorAnimationTimeli
ne* timeline) | 4354 void WebViewImpl::attachCompositorAnimationTimeline(WebCompositorAnimationTimeli
ne* timeline) |
| 4354 { | 4355 { |
| 4355 if (m_layerTreeView) | 4356 if (m_layerTreeView) |
| 4356 m_layerTreeView->attachCompositorAnimationTimeline(timeline); | 4357 m_layerTreeView->attachCompositorAnimationTimeline(timeline->animationTi
meline()); |
| 4357 } | 4358 } |
| 4358 | 4359 |
| 4359 void WebViewImpl::detachCompositorAnimationTimeline(WebCompositorAnimationTimeli
ne* timeline) | 4360 void WebViewImpl::detachCompositorAnimationTimeline(WebCompositorAnimationTimeli
ne* timeline) |
| 4360 { | 4361 { |
| 4361 if (m_layerTreeView) | 4362 if (m_layerTreeView) |
| 4362 m_layerTreeView->detachCompositorAnimationTimeline(timeline); | 4363 m_layerTreeView->detachCompositorAnimationTimeline(timeline->animationTi
meline()); |
| 4363 } | 4364 } |
| 4364 | 4365 |
| 4365 void WebViewImpl::initializeLayerTreeView() | 4366 void WebViewImpl::initializeLayerTreeView() |
| 4366 { | 4367 { |
| 4367 if (m_client) { | 4368 if (m_client) { |
| 4368 m_client->initializeLayerTreeView(); | 4369 m_client->initializeLayerTreeView(); |
| 4369 m_layerTreeView = m_client->layerTreeView(); | 4370 m_layerTreeView = m_client->layerTreeView(); |
| 4370 } | 4371 } |
| 4371 | 4372 |
| 4372 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) | 4373 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) |
| 4373 devTools->layerTreeViewChanged(m_layerTreeView); | 4374 devTools->layerTreeViewChanged(m_layerTreeView); |
| 4374 | 4375 |
| 4375 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); | 4376 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); |
| 4376 if (m_layerTreeView) | 4377 if (m_layerTreeView) |
| 4377 m_page->layerTreeViewInitialized(*m_layerTreeView); | 4378 m_page->layerTreeViewInitialized(*m_layerTreeView); |
| 4378 | 4379 |
| 4379 // FIXME: only unittests, click to play, Android printing, and printing (for
headers and footers) | 4380 // FIXME: only unittests, click to play, Android printing, and printing (for
headers and footers) |
| 4380 // make this assert necessary. We should make them not hit this code and the
n delete allowsBrokenNullLayerTreeView. | 4381 // make this assert necessary. We should make them not hit this code and the
n delete allowsBrokenNullLayerTreeView. |
| 4381 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi
ew()); | 4382 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi
ew()); |
| 4382 | 4383 |
| 4383 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor
m::current()->isThreadedAnimationEnabled() && m_layerTreeView) { | 4384 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor
m::current()->isThreadedAnimationEnabled() && m_layerTreeView) { |
| 4384 ASSERT(Platform::current()->compositorSupport()); | 4385 m_linkHighlightsTimeline = adoptPtr(CompositorFactory::current().createA
nimationTimeline()); |
| 4385 m_linkHighlightsTimeline = adoptPtr(Platform::current()->compositorSuppo
rt()->createAnimationTimeline()); | |
| 4386 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); | 4386 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); |
| 4387 } | 4387 } |
| 4388 | 4388 |
| 4389 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 4389 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
| 4390 attachPaintArtifactCompositor(); | 4390 attachPaintArtifactCompositor(); |
| 4391 } | 4391 } |
| 4392 | 4392 |
| 4393 void WebViewImpl::applyViewportDeltas( | 4393 void WebViewImpl::applyViewportDeltas( |
| 4394 const WebFloatSize& visualViewportDelta, | 4394 const WebFloatSize& visualViewportDelta, |
| 4395 const WebFloatSize& layoutViewportDelta, | 4395 const WebFloatSize& layoutViewportDelta, |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4633 { | 4633 { |
| 4634 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4634 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4635 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4635 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4636 if (!page()) | 4636 if (!page()) |
| 4637 return 1; | 4637 return 1; |
| 4638 | 4638 |
| 4639 return page()->deviceScaleFactor(); | 4639 return page()->deviceScaleFactor(); |
| 4640 } | 4640 } |
| 4641 | 4641 |
| 4642 } // namespace blink | 4642 } // namespace blink |
| OLD | NEW |