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 4251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4262 { | 4262 { |
4263 if (m_client) { | 4263 if (m_client) { |
4264 m_client->initializeLayerTreeView(); | 4264 m_client->initializeLayerTreeView(); |
4265 m_layerTreeView = m_client->layerTreeView(); | 4265 m_layerTreeView = m_client->layerTreeView(); |
4266 } | 4266 } |
4267 | 4267 |
4268 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) | 4268 if (WebDevToolsAgentImpl* devTools = mainFrameDevToolsAgentImpl()) |
4269 devTools->layerTreeViewChanged(m_layerTreeView); | 4269 devTools->layerTreeViewChanged(m_layerTreeView); |
4270 | 4270 |
4271 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); | 4271 m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); |
4272 if (m_layerTreeView) { | 4272 if (m_layerTreeView) |
4273 m_page->layerTreeViewInitialized(*m_layerTreeView); | 4273 m_page->layerTreeViewInitialized(*m_layerTreeView); |
4274 // We don't yet have a page loaded at this point of the initialization o
f WebViewImpl. | |
4275 // Suppress commits until Blink generates invalidations so we don't | |
4276 // attempt to paint too early in the next page load. | |
4277 m_layerTreeView->setDeferCommits(true); | |
4278 } | |
4279 | 4274 |
4280 // FIXME: only unittests, click to play, Android printing, and printing (for
headers and footers) | 4275 // FIXME: only unittests, click to play, Android printing, and printing (for
headers and footers) |
4281 // make this assert necessary. We should make them not hit this code and the
n delete allowsBrokenNullLayerTreeView. | 4276 // make this assert necessary. We should make them not hit this code and the
n delete allowsBrokenNullLayerTreeView. |
4282 DCHECK(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi
ew()); | 4277 DCHECK(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi
ew()); |
4283 | 4278 |
4284 if (Platform::current()->isThreadedAnimationEnabled() && m_layerTreeView) { | 4279 if (Platform::current()->isThreadedAnimationEnabled() && m_layerTreeView) { |
4285 m_linkHighlightsTimeline = adoptPtr(CompositorFactory::current().createA
nimationTimeline()); | 4280 m_linkHighlightsTimeline = adoptPtr(CompositorFactory::current().createA
nimationTimeline()); |
4286 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); | 4281 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); |
4287 } | 4282 } |
4288 | 4283 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4523 { | 4518 { |
4524 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4519 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
4525 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4520 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4526 if (!page()) | 4521 if (!page()) |
4527 return 1; | 4522 return 1; |
4528 | 4523 |
4529 return page()->deviceScaleFactor(); | 4524 return page()->deviceScaleFactor(); |
4530 } | 4525 } |
4531 | 4526 |
4532 } // namespace blink | 4527 } // namespace blink |
OLD | NEW |