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

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

Issue 1131833002: [Sketch] Animations: Torpedo the old intrusive animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@scroll
Patch Set: Delete more. Created 5 years, 7 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
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/platform/WebLayer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 , m_imeAcceptEvents(true) 403 , m_imeAcceptEvents(true)
404 , m_operationsAllowed(WebDragOperationNone) 404 , m_operationsAllowed(WebDragOperationNone)
405 , m_dragOperation(WebDragOperationNone) 405 , m_dragOperation(WebDragOperationNone)
406 , m_devToolsEmulator(nullptr) 406 , m_devToolsEmulator(nullptr)
407 , m_isTransparent(false) 407 , m_isTransparent(false)
408 , m_tabsToLinks(false) 408 , m_tabsToLinks(false)
409 , m_layerTreeView(0) 409 , m_layerTreeView(0)
410 , m_rootLayer(0) 410 , m_rootLayer(0)
411 , m_rootGraphicsLayer(0) 411 , m_rootGraphicsLayer(0)
412 , m_rootTransformLayer(0) 412 , m_rootTransformLayer(0)
413 , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium(this))) 413 , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium()))
414 , m_matchesHeuristicsForGpuRasterization(false) 414 , m_matchesHeuristicsForGpuRasterization(false)
415 , m_recreatingGraphicsContext(false) 415 , m_recreatingGraphicsContext(false)
416 , m_flingModifier(0) 416 , m_flingModifier(0)
417 , m_flingSourceDevice(false) 417 , m_flingSourceDevice(false)
418 , m_fullscreenController(FullscreenController::create(this)) 418 , m_fullscreenController(FullscreenController::create(this))
419 , m_showFPSCounter(false) 419 , m_showFPSCounter(false)
420 , m_continuousPaintingEnabled(false) 420 , m_continuousPaintingEnabled(false)
421 , m_baseBackgroundColor(Color::white) 421 , m_baseBackgroundColor(Color::white)
422 , m_backgroundColorOverride(Color::transparent) 422 , m_backgroundColorOverride(Color::transparent)
423 , m_zoomFactorOverride(0) 423 , m_zoomFactorOverride(0)
(...skipping 3797 matching lines...) Expand 10 before | Expand all | Expand 10 after
4221 { 4221 {
4222 if (!page() || !page()->mainFrame() || !page()->mainFrame()->isLocalFrame()) 4222 if (!page() || !page()->mainFrame() || !page()->mainFrame()->isLocalFrame())
4223 return 0; 4223 return 0;
4224 4224
4225 if (!page()->deprecatedLocalMainFrame()->document() || !page()->deprecatedLo calMainFrame()->document()->layoutView()) 4225 if (!page()->deprecatedLocalMainFrame()->document() || !page()->deprecatedLo calMainFrame()->document()->layoutView())
4226 return 0; 4226 return 0;
4227 4227
4228 return page()->deprecatedLocalMainFrame()->document()->layoutView()->composi tor(); 4228 return page()->deprecatedLocalMainFrame()->document()->layoutView()->composi tor();
4229 } 4229 }
4230 4230
4231 void WebViewImpl::registerForAnimations(WebLayer* layer)
4232 {
4233 if (m_layerTreeView)
4234 m_layerTreeView->registerForAnimations(layer);
4235 }
4236
4237 GraphicsLayer* WebViewImpl::rootGraphicsLayer() 4231 GraphicsLayer* WebViewImpl::rootGraphicsLayer()
4238 { 4232 {
4239 return m_rootGraphicsLayer; 4233 return m_rootGraphicsLayer;
4240 } 4234 }
4241 4235
4242 void WebViewImpl::scheduleAnimation() 4236 void WebViewImpl::scheduleAnimation()
4243 { 4237 {
4244 if (m_layerTreeView) { 4238 if (m_layerTreeView) {
4245 m_layerTreeView->setNeedsAnimate(); 4239 m_layerTreeView->setNeedsAnimate();
4246 return; 4240 return;
(...skipping 23 matching lines...) Expand all
4270 4264
4271 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) 4265 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl())
4272 devTools->layerTreeViewChanged(m_layerTreeView); 4266 devTools->layerTreeViewChanged(m_layerTreeView);
4273 4267
4274 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView != 0); 4268 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView != 0);
4275 4269
4276 // FIXME: only unittests, click to play, Android priting, and printing (for headers and footers) 4270 // FIXME: only unittests, click to play, Android priting, and printing (for headers and footers)
4277 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView. 4271 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView.
4278 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew()); 4272 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew());
4279 4273
4280 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor m::current()->compositorSupport() && m_layerTreeView) { 4274 if (m_layerTreeView) {
4281 m_linkHighlightsTimeline = adoptPtr(Platform::current()->compositorSuppo rt()->createAnimationTimeline()); 4275 m_linkHighlightsTimeline = adoptPtr(Platform::current()->compositorSuppo rt()->createAnimationTimeline());
4282 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); 4276 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get());
4283 } 4277 }
4284 } 4278 }
4285 4279
4286 void WebViewImpl::updateMainFrameScrollPosition(const DoublePoint& scrollPositio n, bool programmaticScroll) 4280 void WebViewImpl::updateMainFrameScrollPosition(const DoublePoint& scrollPositio n, bool programmaticScroll)
4287 { 4281 {
4288 if (!page()->mainFrame()->isLocalFrame()) 4282 if (!page()->mainFrame()->isLocalFrame())
4289 return; 4283 return;
4290 4284
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
4478 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4472 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4479 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4473 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4480 } 4474 }
4481 4475
4482 void WebViewImpl::forceNextWebGLContextCreationToFail() 4476 void WebViewImpl::forceNextWebGLContextCreationToFail()
4483 { 4477 {
4484 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4478 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4485 } 4479 }
4486 4480
4487 } // namespace blink 4481 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/platform/WebLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698