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

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

Issue 946323002: Animations: Introduce compositor AnimationPlayer and AnimationTimeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Format. Created 5 years, 8 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/WebCompositorAnimationPlayer.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 4221 matching lines...) Expand 10 before | Expand all | Expand 10 after
4232 void WebViewImpl::scheduleAnimation() 4232 void WebViewImpl::scheduleAnimation()
4233 { 4233 {
4234 if (m_layerTreeView) { 4234 if (m_layerTreeView) {
4235 m_layerTreeView->setNeedsAnimate(); 4235 m_layerTreeView->setNeedsAnimate();
4236 return; 4236 return;
4237 } 4237 }
4238 if (m_client) 4238 if (m_client)
4239 m_client->scheduleAnimation(); 4239 m_client->scheduleAnimation();
4240 } 4240 }
4241 4241
4242 void WebViewImpl::attachCompositorAnimationTimeline(WebCompositorAnimationTimeli ne* timeline)
4243 {
4244 if (m_layerTreeView)
4245 m_layerTreeView->attachCompositorAnimationTimeline(timeline);
4246 }
4247
4248 void WebViewImpl::detachCompositorAnimationTimeline(WebCompositorAnimationTimeli ne* timeline)
4249 {
4250 if (m_layerTreeView)
4251 m_layerTreeView->detachCompositorAnimationTimeline(timeline);
4252 }
4253
4242 void WebViewImpl::initializeLayerTreeView() 4254 void WebViewImpl::initializeLayerTreeView()
4243 { 4255 {
4244 if (m_client) { 4256 if (m_client) {
4245 m_client->initializeLayerTreeView(); 4257 m_client->initializeLayerTreeView();
4246 m_layerTreeView = m_client->layerTreeView(); 4258 m_layerTreeView = m_client->layerTreeView();
4247 } 4259 }
4248 4260
4249 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView != 0); 4261 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView != 0);
4250 4262
4251 // FIXME: only unittests, click to play, Android priting, and printing (for headers and footers) 4263 // FIXME: only unittests, click to play, Android priting, and printing (for headers and footers)
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
4501 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4513 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4502 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4514 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4503 } 4515 }
4504 4516
4505 void WebViewImpl::forceNextWebGLContextCreationToFail() 4517 void WebViewImpl::forceNextWebGLContextCreationToFail()
4506 { 4518 {
4507 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4519 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4508 } 4520 }
4509 4521
4510 } // namespace blink 4522 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/platform/WebCompositorAnimationPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698