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

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: move cursor swap buffers Created 6 years, 8 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void HardwareDisplayController::OnPageFlipEvent(unsigned int frame, 126 void HardwareDisplayController::OnPageFlipEvent(unsigned int frame,
127 unsigned int seconds, 127 unsigned int seconds,
128 unsigned int useconds) { 128 unsigned int useconds) {
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(DriSurface* surface) {
137 CHECK(state_ != UNASSOCIATED); 137 CHECK(state_ != UNASSOCIATED);
138 return drm_->SetCursor(crtc_id_, 138 bool ret = drm_->SetCursor(crtc_id_,
139 surface.GetHandle(), 139 surface->GetHandle(),
140 surface.size().width(), 140 surface->size().width(),
141 surface.size().height()); 141 surface->size().height());
142 surface->SwapBuffers();
143 return ret;
142 } 144 }
143 145
144 bool HardwareDisplayController::UnsetCursor() { 146 bool HardwareDisplayController::UnsetCursor() {
145 CHECK(state_ != UNASSOCIATED); 147 CHECK(state_ != UNASSOCIATED);
146 return drm_->SetCursor(crtc_id_, 0, 0, 0); 148 return drm_->SetCursor(crtc_id_, 0, 0, 0);
147 } 149 }
148 150
149 bool HardwareDisplayController::MoveCursor(const gfx::Point& location) { 151 bool HardwareDisplayController::MoveCursor(const gfx::Point& location) {
150 CHECK(state_ != UNASSOCIATED); 152 CHECK(state_ != UNASSOCIATED);
151 return drm_->MoveCursor(crtc_id_, location.x(), location.y()); 153 return drm_->MoveCursor(crtc_id_, location.x(), location.y());
152 } 154 }
153 155
154 } // namespace gfx 156 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/ozone/dri/hardware_display_controller.h ('k') | ui/ozone/platform/dri/cursor_factory_evdev_dri.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698