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

Unified Diff: cc/surfaces/display.cc

Issue 2669183002: Seems incorrect to se device_scale_factor in SetLocalSurfaceId.
Patch Set: Created 3 years, 11 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 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_)
« 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