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

Side by Side Diff: ui/gfx/ozone/dri/hardware_display_controller.cc

Issue 208553004: ozone: dri: Do initial cursor set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/gfx/ozone/dri/hardware_display_controller.h" 5 #include "ui/gfx/ozone/dri/hardware_display_controller.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 time_of_last_flip_ = 129 time_of_last_flip_ =
130 static_cast<uint64_t>(seconds) * base::Time::kMicrosecondsPerSecond + 130 static_cast<uint64_t>(seconds) * base::Time::kMicrosecondsPerSecond +
131 useconds; 131 useconds;
132 132
133 surface_->SwapBuffers(); 133 surface_->SwapBuffers();
134 } 134 }
135 135
136 bool HardwareDisplayController::SetCursor(const DriSurface& surface) { 136 bool HardwareDisplayController::SetCursor(const DriSurface& surface) {
137 CHECK(state_ != UNASSOCIATED); 137 CHECK(state_ != UNASSOCIATED);
138 return drm_->SetCursor(crtc_id_, 138 return drm_->SetCursor(crtc_id_,
139 surface.GetHandle(), 139 surface.GetFrontBufferHandle(),
140 surface.size().width(), 140 surface.size().width(),
141 surface.size().height()); 141 surface.size().height());
142 } 142 }
143 143
144 bool HardwareDisplayController::UnsetCursor() { 144 bool HardwareDisplayController::UnsetCursor() {
145 CHECK(state_ != UNASSOCIATED); 145 CHECK(state_ != UNASSOCIATED);
146 return drm_->SetCursor(crtc_id_, 0, 0, 0); 146 return drm_->SetCursor(crtc_id_, 0, 0, 0);
147 } 147 }
148 148
149 bool HardwareDisplayController::MoveCursor(const gfx::Point& location) { 149 bool HardwareDisplayController::MoveCursor(const gfx::Point& location) {
150 CHECK(state_ != UNASSOCIATED); 150 CHECK(state_ != UNASSOCIATED);
151 return drm_->MoveCursor(crtc_id_, location.x(), location.y()); 151 return drm_->MoveCursor(crtc_id_, location.x(), location.y());
152 } 152 }
153 153
154 } // namespace gfx 154 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698