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

Side by Side Diff: ui/ozone/platform/dri/dri_surface_factory.cc

Issue 262163003: [Ozone] Proper cursor support for multi-monitor configurations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GetActiveWindow -> GetCursorWindow Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/ozone/platform/dri/dri_surface_factory.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/dri/dri_surface_factory.h" 5 #include "ui/ozone/platform/dri/dri_surface_factory.h"
6 6
7 #include <drm.h> 7 #include <drm.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <xf86drm.h> 9 #include <xf86drm.h>
10 10
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 controllers_.erase(it); 308 controllers_.erase(it);
309 return; 309 return;
310 } 310 }
311 } 311 }
312 } 312 }
313 313
314 bool DriSurfaceFactory::DisableHardwareDisplayController(uint32_t crtc) { 314 bool DriSurfaceFactory::DisableHardwareDisplayController(uint32_t crtc) {
315 return drm_->DisableCrtc(crtc); 315 return drm_->DisableCrtc(crtc);
316 } 316 }
317 317
318 gfx::Size DriSurfaceFactory::GetWidgetSize(gfx::AcceleratedWidget w) {
319 if (IsWidgetValid(w)) {
320 HardwareDisplayController* controller = GetControllerForWidget(w);
321 return gfx::Size(controller->get_mode().hdisplay,
322 controller->get_mode().vdisplay);
323 }
324
325 return gfx::Size(0, 0);
326 }
327
318 void DriSurfaceFactory::SetHardwareCursor(gfx::AcceleratedWidget window, 328 void DriSurfaceFactory::SetHardwareCursor(gfx::AcceleratedWidget window,
319 const SkBitmap& image, 329 const SkBitmap& image,
320 const gfx::Point& location) { 330 const gfx::Point& location) {
321 cursor_bitmap_ = image; 331 cursor_bitmap_ = image;
322 cursor_location_ = location; 332 cursor_location_ = location;
323 333
324 if (state_ != INITIALIZED) 334 if (state_ != INITIALIZED)
325 return; 335 return;
326 336
327 ResetCursor(window); 337 ResetCursor(window);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 427
418 HardwareDisplayController* DriSurfaceFactory::GetControllerForWidget( 428 HardwareDisplayController* DriSurfaceFactory::GetControllerForWidget(
419 gfx::AcceleratedWidget w) { 429 gfx::AcceleratedWidget w) {
420 HardwareDisplayControllerMap::iterator it = controllers_.find(w); 430 HardwareDisplayControllerMap::iterator it = controllers_.find(w);
421 CHECK(it != controllers_.end()); 431 CHECK(it != controllers_.end());
422 432
423 return it->second; 433 return it->second;
424 } 434 }
425 435
426 } // namespace ui 436 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_surface_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698