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

Side by Side Diff: ui/ozone/platform/drm/gpu/screen_manager.cc

Issue 1311043016: Switch DRM platform to using a separate thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mv-drm-calls-on-thread2
Patch Set: update & fix clang Created 5 years, 2 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/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
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
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
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/proxy_helpers.cc ('k') | ui/ozone/platform/drm/gpu/screen_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698