Chromium Code Reviews| Index: cc/surfaces/display.cc |
| diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc |
| index 2a83572c9f51d24f370648f2edf22be5a87d7eef..db80bcb167825a6bc1c870619957a14549807d6a 100644 |
| --- a/cc/surfaces/display.cc |
| +++ b/cc/surfaces/display.cc |
| @@ -104,22 +104,28 @@ void Display::Initialize(DisplayClient* client, |
| } |
| } |
| -void Display::SetLocalSurfaceId(const LocalSurfaceId& id, |
| - float device_scale_factor) { |
| - if (current_surface_id_.local_surface_id() == id && |
| - device_scale_factor_ == device_scale_factor) { |
| +void Display::SetLocalSurfaceId(const LocalSurfaceId& id) { |
| + if (current_surface_id_.local_surface_id() == id) { |
|
Fady Samuel
2017/02/02 16:34:29
drop the braces { and }.
|
| return; |
| } |
| TRACE_EVENT0("cc", "Display::SetSurfaceId"); |
| current_surface_id_ = SurfaceId(frame_sink_id_, id); |
| - device_scale_factor_ = device_scale_factor; |
| UpdateRootSurfaceResourcesLocked(); |
| if (scheduler_) |
| scheduler_->SetNewRootSurface(current_surface_id_); |
| } |
| +void Display::SetDeviceScaleFactor(float device_scale_factor) { |
| + if (device_scale_factor_ == device_scale_factor) { |
| + return; |
| + } |
| + |
| + TRACE_EVENT0("cc", "Display::SetDeviceScaleFactor"); |
| + device_scale_factor_ = device_scale_factor; |
|
Fady Samuel
2017/02/02 16:34:29
We might want to mark SurfaceDamaged here.
k.devara
2017/02/03 11:35:37
I was thinking device_scale_factor may not trigger
|
| +} |
| + |
| void Display::SetVisible(bool visible) { |
| TRACE_EVENT1("cc", "Display::SetVisible", "visible", visible); |
| if (renderer_) |