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

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

Issue 543643003: ozone: Plumb animated cursors from BitmapCursorFactoryOzone to DriSurfaceFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: ui/ozone/platform/dri/dri_cursor.cc
diff --git a/ui/ozone/platform/dri/dri_cursor.cc b/ui/ozone/platform/dri/dri_cursor.cc
index f2f71c2e758a618ac7e3c7d350248ce51b1b5a4e..b9b644416ad857fad9c3d15a8c032ca4596654f5 100644
--- a/ui/ozone/platform/dri/dri_cursor.cc
+++ b/ui/ozone/platform/dri/dri_cursor.cc
@@ -32,16 +32,18 @@ void DriCursor::SetCursor(gfx::AcceleratedWidget widget,
cursor_ = cursor;
if (cursor_)
- hardware_->SetHardwareCursor(
- cursor_window_, cursor_->bitmap(), bitmap_location());
+ hardware_->SetHardwareCursor(cursor_window_,
+ cursor_->bitmaps(),
+ bitmap_location(),
+ cursor_->frame_delay_ms());
else
- hardware_->SetHardwareCursor(cursor_window_, SkBitmap(), gfx::Point());
+ UnsetCursor(cursor_window_);
}
void DriCursor::MoveCursorTo(gfx::AcceleratedWidget widget,
const gfx::PointF& location) {
if (widget != cursor_window_)
- hardware_->SetHardwareCursor(cursor_window_, SkBitmap(), gfx::Point());
+ UnsetCursor(cursor_window_);
cursor_window_ = widget;
cursor_location_ = location;
@@ -75,4 +77,9 @@ gfx::Point DriCursor::bitmap_location() {
cursor_->hotspot().OffsetFromOrigin();
}
+void DriCursor::UnsetCursor(gfx::AcceleratedWidget widget) {
+ hardware_->SetHardwareCursor(
+ widget, std::vector<SkBitmap>(), gfx::Point(), 0);
+}
+
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698