| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1219 void RenderWidget::AutoResizeCompositor() { | 1219 void RenderWidget::AutoResizeCompositor() { |
| 1220 physical_backing_size_ = gfx::ScaleToCeiledSize(size_, device_scale_factor_); | 1220 physical_backing_size_ = gfx::ScaleToCeiledSize(size_, device_scale_factor_); |
| 1221 if (compositor_) | 1221 if (compositor_) |
| 1222 compositor_->setViewportSize(physical_backing_size_); | 1222 compositor_->setViewportSize(physical_backing_size_); |
| 1223 } | 1223 } |
| 1224 | 1224 |
| 1225 void RenderWidget::initializeLayerTreeView() { | 1225 void RenderWidget::initializeLayerTreeView() { |
| 1226 DCHECK(!host_closing_); | 1226 DCHECK(!host_closing_); |
| 1227 | 1227 |
| 1228 compositor_ = RenderWidgetCompositor::Create(this, device_scale_factor_, | 1228 compositor_ = RenderWidgetCompositor::Create(this, device_scale_factor_, |
| 1229 compositor_deps_); | 1229 screen_info_, compositor_deps_); |
| 1230 compositor_->setViewportSize(physical_backing_size_); | 1230 compositor_->setViewportSize(physical_backing_size_); |
| 1231 OnDeviceScaleFactorChanged(); | 1231 OnDeviceScaleFactorChanged(); |
| 1232 compositor_->SetDeviceColorSpace(screen_info_.icc_profile.GetColorSpace()); | 1232 compositor_->SetDeviceColorSpace(screen_info_.icc_profile.GetColorSpace()); |
| 1233 // For background pages and certain tests, we don't want to trigger | 1233 // For background pages and certain tests, we don't want to trigger |
| 1234 // CompositorFrameSink creation. | 1234 // CompositorFrameSink creation. |
| 1235 if (compositor_never_visible_ || !RenderThreadImpl::current()) | 1235 if (compositor_never_visible_ || !RenderThreadImpl::current()) |
| 1236 compositor_->SetNeverVisible(); | 1236 compositor_->SetNeverVisible(); |
| 1237 | 1237 |
| 1238 StartCompositor(); | 1238 StartCompositor(); |
| 1239 DCHECK_NE(MSG_ROUTING_NONE, routing_id_); | 1239 DCHECK_NE(MSG_ROUTING_NONE, routing_id_); |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2273 // browser side (https://crbug.com/669219). | 2273 // browser side (https://crbug.com/669219). |
| 2274 // If there is no WebFrameWidget, then there will be no | 2274 // If there is no WebFrameWidget, then there will be no |
| 2275 // InputMethodControllers for a WebLocalFrame. | 2275 // InputMethodControllers for a WebLocalFrame. |
| 2276 return nullptr; | 2276 return nullptr; |
| 2277 } | 2277 } |
| 2278 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2278 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
| 2279 ->getActiveWebInputMethodController(); | 2279 ->getActiveWebInputMethodController(); |
| 2280 } | 2280 } |
| 2281 | 2281 |
| 2282 } // namespace content | 2282 } // namespace content |
| OLD | NEW |