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

Side by Side Diff: ui/display/chromeos/update_display_configuration_task.cc

Issue 1024943003: Don't update framebuffer_size to 0x0 when the framebuffer size didn't change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/display/chromeos/update_display_configuration_task.h" 5 #include "ui/display/chromeos/update_display_configuration_task.h"
6 6
7 #include "ui/display/chromeos/configure_displays_task.h" 7 #include "ui/display/chromeos/configure_displays_task.h"
8 #include "ui/display/chromeos/display_util.h" 8 #include "ui/display/chromeos/display_util.h"
9 #include "ui/display/types/display_snapshot.h" 9 #include "ui/display/types/display_snapshot.h"
10 #include "ui/display/types/native_display_delegate.h" 10 #include "ui/display/types/native_display_delegate.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void UpdateDisplayConfigurationTask::EnterState( 79 void UpdateDisplayConfigurationTask::EnterState(
80 const ConfigureDisplaysTask::ResponseCallback& callback) { 80 const ConfigureDisplaysTask::ResponseCallback& callback) {
81 VLOG(2) << "EnterState"; 81 VLOG(2) << "EnterState";
82 std::vector<DisplayConfigureRequest> requests; 82 std::vector<DisplayConfigureRequest> requests;
83 if (!layout_manager_->GetDisplayLayout(cached_displays_, new_display_state_, 83 if (!layout_manager_->GetDisplayLayout(cached_displays_, new_display_state_,
84 new_power_state_, &requests, 84 new_power_state_, &requests,
85 &framebuffer_size_)) { 85 &framebuffer_size_)) {
86 callback.Run(ConfigureDisplaysTask::ERROR); 86 callback.Run(ConfigureDisplaysTask::ERROR);
87 return; 87 return;
88 } 88 }
89
90 if (!requests.empty()) { 89 if (!requests.empty()) {
90 DCHECK(!framebuffer_size_.IsEmpty());
91 delegate_->CreateFrameBuffer(framebuffer_size_); 91 delegate_->CreateFrameBuffer(framebuffer_size_);
92 configure_task_.reset( 92 configure_task_.reset(
93 new ConfigureDisplaysTask(delegate_, requests, callback)); 93 new ConfigureDisplaysTask(delegate_, requests, callback));
94 configure_task_->Run(); 94 configure_task_->Run();
95 } else { 95 } else {
96 VLOG(2) << "No displays"; 96 VLOG(2) << "No displays";
97 callback.Run(ConfigureDisplaysTask::SUCCESS); 97 callback.Run(ConfigureDisplaysTask::SUCCESS);
98 } 98 }
99 } 99 }
100 100
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 return layout_manager_->GetStateController()->GetStateForDisplayIds( 201 return layout_manager_->GetStateController()->GetStateForDisplayIds(
202 display_ids); 202 display_ids);
203 } 203 }
204 NOTREACHED(); 204 NOTREACHED();
205 } 205 }
206 } 206 }
207 return MULTIPLE_DISPLAY_STATE_INVALID; 207 return MULTIPLE_DISPLAY_STATE_INVALID;
208 } 208 }
209 209
210 } // namespace ui 210 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698