OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/compositor/delegated_frame_host.h" | 5 #include "content/browser/compositor/delegated_frame_host.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
10 #include "cc/output/compositor_frame_ack.h" | 10 #include "cc/output/compositor_frame_ack.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 resize_lock_ = client_->CreateResizeLock(defer_compositor_lock); | 132 resize_lock_ = client_->CreateResizeLock(defer_compositor_lock); |
133 } | 133 } |
134 | 134 |
135 bool DelegatedFrameHost::ShouldCreateResizeLock() { | 135 bool DelegatedFrameHost::ShouldCreateResizeLock() { |
136 RenderWidgetHostImpl* host = client_->GetHost(); | 136 RenderWidgetHostImpl* host = client_->GetHost(); |
137 | 137 |
138 if (resize_lock_) | 138 if (resize_lock_) |
139 return false; | 139 return false; |
140 | 140 |
141 if (host->should_auto_resize()) | 141 if (host->auto_resize_enabled()) |
142 return false; | 142 return false; |
143 | 143 |
144 gfx::Size desired_size = client_->DesiredFrameSize(); | 144 gfx::Size desired_size = client_->DesiredFrameSize(); |
145 if (desired_size == current_frame_size_in_dip_ || desired_size.IsEmpty()) | 145 if (desired_size == current_frame_size_in_dip_ || desired_size.IsEmpty()) |
146 return false; | 146 return false; |
147 | 147 |
148 ui::Compositor* compositor = client_->GetCompositor(); | 148 ui::Compositor* compositor = client_->GetCompositor(); |
149 if (!compositor) | 149 if (!compositor) |
150 return false; | 150 return false; |
151 | 151 |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | 1012 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
1013 cc::SurfaceManager* manager = factory->GetSurfaceManager(); | 1013 cc::SurfaceManager* manager = factory->GetSurfaceManager(); |
1014 new_layer->SetShowSurface( | 1014 new_layer->SetShowSurface( |
1015 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), | 1015 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), |
1016 base::Bind(&RequireCallback, base::Unretained(manager)), | 1016 base::Bind(&RequireCallback, base::Unretained(manager)), |
1017 current_surface_size_, current_frame_size_in_dip_); | 1017 current_surface_size_, current_frame_size_in_dip_); |
1018 } | 1018 } |
1019 } | 1019 } |
1020 | 1020 |
1021 } // namespace content | 1021 } // namespace content |
OLD | NEW |