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 3980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3991 if (layer_tree_view_ && layer_tree_view_->CompositorAnimationHost()) { | 3991 if (layer_tree_view_ && layer_tree_view_->CompositorAnimationHost()) { |
3992 animation_host_ = WTF::MakeUnique<CompositorAnimationHost>( | 3992 animation_host_ = WTF::MakeUnique<CompositorAnimationHost>( |
3993 layer_tree_view_->CompositorAnimationHost()); | 3993 layer_tree_view_->CompositorAnimationHost()); |
3994 } | 3994 } |
3995 } | 3995 } |
3996 | 3996 |
3997 if (WebDevToolsAgentImpl* dev_tools = MainFrameDevToolsAgentImpl()) | 3997 if (WebDevToolsAgentImpl* dev_tools = MainFrameDevToolsAgentImpl()) |
3998 dev_tools->LayerTreeViewChanged(layer_tree_view_); | 3998 dev_tools->LayerTreeViewChanged(layer_tree_view_); |
3999 | 3999 |
4000 page_->GetSettings().SetAcceleratedCompositingEnabled(layer_tree_view_); | 4000 page_->GetSettings().SetAcceleratedCompositingEnabled(layer_tree_view_); |
4001 if (layer_tree_view_) | 4001 if (layer_tree_view_) { |
4002 page_->LayerTreeViewInitialized(*layer_tree_view_, nullptr); | 4002 page_->LayerTreeViewInitialized(*layer_tree_view_, nullptr); |
| 4003 // We don't yet have a page loaded at this point of the initialization of |
| 4004 // WebViewImpl, so don't allow cc to commit any frames Blink might |
| 4005 // try to create in the meantime. |
| 4006 layer_tree_view_->SetDeferCommits(true); |
| 4007 } |
4003 | 4008 |
4004 // FIXME: only unittests, click to play, Android printing, and printing (for | 4009 // FIXME: only unittests, click to play, Android printing, and printing (for |
4005 // headers and footers) make this assert necessary. We should make them not | 4010 // headers and footers) make this assert necessary. We should make them not |
4006 // hit this code and then delete allowsBrokenNullLayerTreeView. | 4011 // hit this code and then delete allowsBrokenNullLayerTreeView. |
4007 DCHECK(layer_tree_view_ || !client_ || | 4012 DCHECK(layer_tree_view_ || !client_ || |
4008 client_->WidgetClient()->AllowsBrokenNullLayerTreeView()); | 4013 client_->WidgetClient()->AllowsBrokenNullLayerTreeView()); |
4009 | 4014 |
4010 if (Platform::Current()->IsThreadedAnimationEnabled() && layer_tree_view_) { | 4015 if (Platform::Current()->IsThreadedAnimationEnabled() && layer_tree_view_) { |
4011 link_highlights_timeline_ = CompositorAnimationTimeline::Create(); | 4016 link_highlights_timeline_ = CompositorAnimationTimeline::Create(); |
4012 AttachCompositorAnimationTimeline(link_highlights_timeline_.get()); | 4017 AttachCompositorAnimationTimeline(link_highlights_timeline_.get()); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4180 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) | 4185 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) |
4181 return nullptr; | 4186 return nullptr; |
4182 return focused_frame; | 4187 return focused_frame; |
4183 } | 4188 } |
4184 | 4189 |
4185 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { | 4190 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { |
4186 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; | 4191 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; |
4187 } | 4192 } |
4188 | 4193 |
4189 } // namespace blink | 4194 } // namespace blink |
OLD | NEW |