| 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 "ui/ozone/platform/drm/gpu/screen_manager.h" | 5 #include "ui/ozone/platform/drm/gpu/screen_manager.h" |
| 6 | 6 |
| 7 #include <xf86drmMode.h> | 7 #include <xf86drmMode.h> |
| 8 | 8 |
| 9 #include "third_party/skia/include/core/SkCanvas.h" | 9 #include "third_party/skia/include/core/SkCanvas.h" |
| 10 #include "ui/gfx/geometry/point.h" | 10 #include "ui/gfx/geometry/point.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 DCHECK(window) << "Attempting to remove non-existing window for " << widget; | 228 DCHECK(window) << "Attempting to remove non-existing window for " << widget; |
| 229 UpdateControllerToWindowMapping(); | 229 UpdateControllerToWindowMapping(); |
| 230 return window.Pass(); | 230 return window.Pass(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 DrmWindow* ScreenManager::GetWindow(gfx::AcceleratedWidget widget) { | 233 DrmWindow* ScreenManager::GetWindow(gfx::AcceleratedWidget widget) { |
| 234 WidgetToWindowMap::iterator it = window_map_.find(widget); | 234 WidgetToWindowMap::iterator it = window_map_.find(widget); |
| 235 if (it != window_map_.end()) | 235 if (it != window_map_.end()) |
| 236 return it->second; | 236 return it->second; |
| 237 | 237 |
| 238 NOTREACHED() << "Attempting to get non-existing window for " << widget; | |
| 239 return nullptr; | 238 return nullptr; |
| 240 } | 239 } |
| 241 | 240 |
| 242 ScreenManager::HardwareDisplayControllers::iterator | 241 ScreenManager::HardwareDisplayControllers::iterator |
| 243 ScreenManager::FindDisplayController(const scoped_refptr<DrmDevice>& drm, | 242 ScreenManager::FindDisplayController(const scoped_refptr<DrmDevice>& drm, |
| 244 uint32_t crtc) { | 243 uint32_t crtc) { |
| 245 for (HardwareDisplayControllers::iterator it = controllers_.begin(); | 244 for (HardwareDisplayControllers::iterator it = controllers_.begin(); |
| 246 it != controllers_.end(); ++it) { | 245 it != controllers_.end(); ++it) { |
| 247 if ((*it)->HasCrtc(drm, crtc)) | 246 if ((*it)->HasCrtc(drm, crtc)) |
| 248 return it; | 247 return it; |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 DrmWindow* ScreenManager::FindWindowAt(const gfx::Rect& bounds) const { | 384 DrmWindow* ScreenManager::FindWindowAt(const gfx::Rect& bounds) const { |
| 386 for (auto pair : window_map_) { | 385 for (auto pair : window_map_) { |
| 387 if (pair.second->bounds() == bounds) | 386 if (pair.second->bounds() == bounds) |
| 388 return pair.second; | 387 return pair.second; |
| 389 } | 388 } |
| 390 | 389 |
| 391 return nullptr; | 390 return nullptr; |
| 392 } | 391 } |
| 393 | 392 |
| 394 } // namespace ui | 393 } // namespace ui |
| OLD | NEW |