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

Unified Diff: ui/ozone/platform/dri/dri_window_delegate_impl.cc

Issue 795933008: Allow ability to handle cursor position changes on gpu IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/dri/dri_window_delegate_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_window_delegate_impl.cc
diff --git a/ui/ozone/platform/dri/dri_window_delegate_impl.cc b/ui/ozone/platform/dri/dri_window_delegate_impl.cc
index 50b2282d8f4c2375eb40be5d776d186b1e2b1b3e..b82130b913cd65e6552ebfdc9f4c4346fd8382ad 100644
--- a/ui/ozone/platform/dri/dri_window_delegate_impl.cc
+++ b/ui/ozone/platform/dri/dri_window_delegate_impl.cc
@@ -108,7 +108,7 @@ void DriWindowDelegateImpl::SetCursor(const std::vector<SkBitmap>& bitmaps,
FROM_HERE, base::TimeDelta::FromMilliseconds(cursor_frame_delay_ms_),
this, &DriWindowDelegateImpl::OnCursorAnimationTimeout);
- ResetCursor();
+ ResetCursor(false);
}
void DriWindowDelegateImpl::MoveCursor(const gfx::Point& location) {
@@ -118,7 +118,7 @@ void DriWindowDelegateImpl::MoveCursor(const gfx::Point& location) {
controller_->MoveCursor(location);
}
-void DriWindowDelegateImpl::ResetCursor() {
+void DriWindowDelegateImpl::ResetCursor(bool bitmap_only) {
if (cursor_bitmaps_.size()) {
// Draw new cursor into backbuffer.
UpdateCursorImage(cursor_buffers_[cursor_frontbuffer_ ^ 1].get(),
@@ -126,7 +126,8 @@ void DriWindowDelegateImpl::ResetCursor() {
// Reset location & buffer.
if (controller_) {
- controller_->MoveCursor(cursor_location_);
+ if (!bitmap_only)
+ controller_->MoveCursor(cursor_location_);
controller_->SetCursor(cursor_buffers_[cursor_frontbuffer_ ^ 1]);
cursor_frontbuffer_ ^= 1;
}
@@ -141,7 +142,7 @@ void DriWindowDelegateImpl::OnCursorAnimationTimeout() {
cursor_frame_++;
cursor_frame_ %= cursor_bitmaps_.size();
- ResetCursor();
+ ResetCursor(true);
}
} // namespace ui
« no previous file with comments | « ui/ozone/platform/dri/dri_window_delegate_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698