Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "components/view_manager/display_manager.h" | 5 #include "components/view_manager/display_manager.h" |
| 6 | 6 |
| 7 #include "base/numerics/safe_conversions.h" | 7 #include "base/numerics/safe_conversions.h" |
| 8 #include "cc/output/compositor_frame.h" | 8 #include "cc/output/compositor_frame.h" |
| 9 #include "cc/output/delegated_frame_data.h" | 9 #include "cc/output/delegated_frame_data.h" |
| 10 #include "cc/quads/render_pass.h" | 10 #include "cc/quads/render_pass.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 #endif | 151 #endif |
| 152 } | 152 } |
| 153 platform_window_->SetBounds(bounds); | 153 platform_window_->SetBounds(bounds); |
| 154 platform_window_->Show(); | 154 platform_window_->Show(); |
| 155 } | 155 } |
| 156 | 156 |
| 157 DefaultDisplayManager::~DefaultDisplayManager() { | 157 DefaultDisplayManager::~DefaultDisplayManager() { |
| 158 // Destroy the PlatformWindow early on as it may call us back during | 158 // Destroy the PlatformWindow early on as it may call us back during |
| 159 // destruction and we want to be in a known state. But destroy the surface | 159 // destruction and we want to be in a known state. But destroy the surface |
| 160 // first because it can still be using the platform window. | 160 // first because it can still be using the platform window. |
| 161 dirty_rect_ = gfx::Rect(); | |
|
sky
2015/09/03 19:31:59
Why do you need to reset the dirty_rect_ here? Ass
sadrul
2015/09/03 21:49:00
Looks like I don't need this anymore. Removed.
| |
| 161 top_level_display_client_.reset(); | 162 top_level_display_client_.reset(); |
| 162 platform_window_.reset(); | 163 platform_window_.reset(); |
| 163 } | 164 } |
| 164 | 165 |
| 165 void DefaultDisplayManager::SchedulePaint(const ServerView* view, | 166 void DefaultDisplayManager::SchedulePaint(const ServerView* view, |
| 166 const gfx::Rect& bounds) { | 167 const gfx::Rect& bounds) { |
| 167 DCHECK(view); | 168 DCHECK(view); |
| 168 if (!view->IsDrawn()) | 169 if (!view->IsDrawn()) |
| 169 return; | 170 return; |
| 170 const gfx::Rect root_relative_rect = | 171 const gfx::Rect root_relative_rect = |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 352 top_level_display_client_.reset(new surfaces::TopLevelDisplayClient( | 353 top_level_display_client_.reset(new surfaces::TopLevelDisplayClient( |
| 353 widget, gpu_state_, surfaces_state_)); | 354 widget, gpu_state_, surfaces_state_)); |
| 354 } | 355 } |
| 355 UpdateMetrics(metrics_.size_in_pixels.To<gfx::Size>(), device_pixel_ratio); | 356 UpdateMetrics(metrics_.size_in_pixels.To<gfx::Size>(), device_pixel_ratio); |
| 356 } | 357 } |
| 357 | 358 |
| 358 void DefaultDisplayManager::OnActivationChanged(bool active) { | 359 void DefaultDisplayManager::OnActivationChanged(bool active) { |
| 359 } | 360 } |
| 360 | 361 |
| 361 } // namespace view_manager | 362 } // namespace view_manager |
| OLD | NEW |