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

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

Issue 1934513004: Start out deferring commits in WebViewImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | 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 4251 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
4274 4279
4275 // FIXME: only unittests, click to play, Android printing, and printing (for headers and footers) 4280 // FIXME: only unittests, click to play, Android printing, and printing (for headers and footers)
4276 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView. 4281 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView.
4277 DCHECK(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew()); 4282 DCHECK(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew());
4278 4283
4279 if (Platform::current()->isThreadedAnimationEnabled() && m_layerTreeView) { 4284 if (Platform::current()->isThreadedAnimationEnabled() && m_layerTreeView) {
4280 m_linkHighlightsTimeline = adoptPtr(CompositorFactory::current().createA nimationTimeline()); 4285 m_linkHighlightsTimeline = adoptPtr(CompositorFactory::current().createA nimationTimeline());
4281 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get()); 4286 attachCompositorAnimationTimeline(m_linkHighlightsTimeline.get());
4282 } 4287 }
4283 4288
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
4518 { 4523 {
4519 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4524 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4520 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4525 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4521 if (!page()) 4526 if (!page())
4522 return 1; 4527 return 1;
4523 4528
4524 return page()->deviceScaleFactor(); 4529 return page()->deviceScaleFactor();
4525 } 4530 }
4526 4531
4527 } // namespace blink 4532 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698