Chromium Code Reviews| 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 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1561 #else | 1561 #else |
| 1562 return !!webwidget_; | 1562 return !!webwidget_; |
| 1563 #endif | 1563 #endif |
| 1564 } | 1564 } |
| 1565 | 1565 |
| 1566 void RenderWidget::SetDeviceScaleFactor(float device_scale_factor) { | 1566 void RenderWidget::SetDeviceScaleFactor(float device_scale_factor) { |
| 1567 if (device_scale_factor_ == device_scale_factor) | 1567 if (device_scale_factor_ == device_scale_factor) |
| 1568 return; | 1568 return; |
| 1569 | 1569 |
| 1570 device_scale_factor_ = device_scale_factor; | 1570 device_scale_factor_ = device_scale_factor; |
| 1571 // TODO(wjmaclean): do we need the following line? It only seems to matter for | |
| 1572 // InitializeLayerTreeView, which only happens during initialization in which | |
| 1573 // case the physical_backing_size is (I think) set via the view params set | |
| 1574 // during construction. | |
| 1575 physical_backing_size_ = gfx::ScaleToCeiledSize(size_, device_scale_factor_); | |
|
oshima
2016/07/12 14:14:41
physical_backing_size_ is resized in OnResize.
I
wjmaclean
2016/07/29 17:12:37
I'm not sure I follow. By "fold" do you mean to pu
oshima
2016/07/29 18:11:46
Yes.
| |
| 1571 | 1576 |
| 1572 OnDeviceScaleFactorChanged(); | 1577 OnDeviceScaleFactorChanged(); |
| 1573 | 1578 |
| 1574 ScheduleComposite(); | 1579 ScheduleComposite(); |
| 1575 } | 1580 } |
| 1576 | 1581 |
| 1577 bool RenderWidget::SetDeviceColorProfile( | 1582 bool RenderWidget::SetDeviceColorProfile( |
| 1578 const std::vector<char>& color_profile) { | 1583 const std::vector<char>& color_profile) { |
| 1579 if (device_color_profile_ == color_profile) | 1584 if (device_color_profile_ == color_profile) |
| 1580 return false; | 1585 return false; |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1979 void RenderWidget::requestPointerUnlock() { | 1984 void RenderWidget::requestPointerUnlock() { |
| 1980 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 1985 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
| 1981 } | 1986 } |
| 1982 | 1987 |
| 1983 bool RenderWidget::isPointerLocked() { | 1988 bool RenderWidget::isPointerLocked() { |
| 1984 return mouse_lock_dispatcher_->IsMouseLockedTo( | 1989 return mouse_lock_dispatcher_->IsMouseLockedTo( |
| 1985 webwidget_mouse_lock_target_.get()); | 1990 webwidget_mouse_lock_target_.get()); |
| 1986 } | 1991 } |
| 1987 | 1992 |
| 1988 } // namespace content | 1993 } // namespace content |
| OLD | NEW |