Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1173)

Unified Diff: cc/surfaces/display.cc

Issue 2669183002: Seems incorrect to se device_scale_factor in SetLocalSurfaceId.
Patch Set: Seems incorrect to set device_scale_factor in SetLocalSurfaceId. Added new function SetDeviceScaleF… Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/display_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index 0e2c932b38a1bc78fae4a0dacde58621d4885d9e..d9f149d2bfa561a0f6bb72b810125662e3522418 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -104,22 +104,26 @@ 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)
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;
+}
+
void Display::SetVisible(bool visible) {
TRACE_EVENT1("cc", "Display::SetVisible", "visible", visible);
if (renderer_)
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698