Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1616653002: CC Animation: Move files from cc_blink to Source/platform/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GC Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 4232 matching lines...) Expand 10 before | Expand all | Expand 10 after
4341 void WebViewImpl::scheduleAnimation() 4342 void WebViewImpl::scheduleAnimation()
4342 { 4343 {
4343 if (m_layerTreeView) { 4344 if (m_layerTreeView) {
4344 m_layerTreeView->setNeedsBeginFrame(); 4345 m_layerTreeView->setNeedsBeginFrame();
4345 return; 4346 return;
4346 } 4347 }
4347 if (m_client) 4348 if (m_client)
4348 m_client->scheduleAnimation(); 4349 m_client->scheduleAnimation();
4349 } 4350 }
4350 4351
4351 void WebViewImpl::attachCompositorAnimationTimeline(WebCompositorAnimationTimeli ne* timeline) 4352 void WebViewImpl::attachCompositorAnimationTimeline(CompositorAnimationTimeline* timeline)
4352 { 4353 {
4353 if (m_layerTreeView) 4354 if (m_layerTreeView)
4354 m_layerTreeView->attachCompositorAnimationTimeline(timeline); 4355 m_layerTreeView->attachCompositorAnimationTimeline(timeline->animationTi meline());
4355 } 4356 }
4356 4357
4357 void WebViewImpl::detachCompositorAnimationTimeline(WebCompositorAnimationTimeli ne* timeline) 4358 void WebViewImpl::detachCompositorAnimationTimeline(CompositorAnimationTimeline* timeline)
4358 { 4359 {
4359 if (m_layerTreeView) 4360 if (m_layerTreeView)
4360 m_layerTreeView->detachCompositorAnimationTimeline(timeline); 4361 m_layerTreeView->detachCompositorAnimationTimeline(timeline->animationTi meline());
4361 } 4362 }
4362 4363
4363 void WebViewImpl::initializeLayerTreeView() 4364 void WebViewImpl::initializeLayerTreeView()
4364 { 4365 {
4365 if (m_client) { 4366 if (m_client) {
4366 m_client->initializeLayerTreeView(); 4367 m_client->initializeLayerTreeView();
4367 m_layerTreeView = m_client->layerTreeView(); 4368 m_layerTreeView = m_client->layerTreeView();
4368 } 4369 }
4369 4370
4370 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) 4371 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl())
4371 devTools->layerTreeViewChanged(m_layerTreeView); 4372 devTools->layerTreeViewChanged(m_layerTreeView);
4372 4373
4373 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); 4374 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView);
4374 if (m_layerTreeView) 4375 if (m_layerTreeView)
4375 m_page->layerTreeViewInitialized(*m_layerTreeView); 4376 m_page->layerTreeViewInitialized(*m_layerTreeView);
4376 4377
4377 // FIXME: only unittests, click to play, Android printing, and printing (for headers and footers) 4378 // FIXME: only unittests, click to play, Android printing, and printing (for headers and footers)
4378 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView. 4379 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView.
4379 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew()); 4380 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew());
4380 4381
4381 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor m::current()->isThreadedAnimationEnabled() && m_layerTreeView) { 4382 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor m::current()->isThreadedAnimationEnabled() && m_layerTreeView) {
4382 ASSERT(Platform::current()->compositorSupport()); 4383 m_linkHighlightsTimeline = adoptPtr(CompositorFactory::current().createA nimationTimeline());
4383 m_linkHighlightsTimeline = adoptPtr(Platform::current()->compositorSuppo rt()->createAnimationTimeline());
4384 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); 4384 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get());
4385 } 4385 }
4386 4386
4387 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) 4387 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
4388 attachPaintArtifactCompositor(); 4388 attachPaintArtifactCompositor();
4389 } 4389 }
4390 4390
4391 void WebViewImpl::applyViewportDeltas( 4391 void WebViewImpl::applyViewportDeltas(
4392 const WebFloatSize& visualViewportDelta, 4392 const WebFloatSize& visualViewportDelta,
4393 const WebFloatSize& layoutViewportDelta, 4393 const WebFloatSize& layoutViewportDelta,
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
4631 { 4631 {
4632 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4632 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4633 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4633 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4634 if (!page()) 4634 if (!page())
4635 return 1; 4635 return 1;
4636 4636
4637 return page()->deviceScaleFactor(); 4637 return page()->deviceScaleFactor();
4638 } 4638 }
4639 4639
4640 } // namespace blink 4640 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698