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

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

Issue 543643003: ozone: Plumb animated cursors from BitmapCursorFactoryOzone to DriSurfaceFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix dri_surface_factory_unittest 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
« no previous file with comments | « ui/ozone/platform/dri/dri_surface_factory.h ('k') | ui/ozone/platform/dri/dri_surface_factory_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_surface_factory.cc
diff --git a/ui/ozone/platform/dri/dri_surface_factory.cc b/ui/ozone/platform/dri/dri_surface_factory.cc
index fb0a8cf96d5cf622d1bbfe7b5323184ee064bfcc..cea8fa77409d9dc76d702debf3b590c94f39c46d 100644
--- a/ui/ozone/platform/dri/dri_surface_factory.cc
+++ b/ui/ozone/platform/dri/dri_surface_factory.cc
@@ -110,10 +110,15 @@ bool DriSurfaceFactory::LoadEGLGLES2Bindings(
}
void DriSurfaceFactory::SetHardwareCursor(gfx::AcceleratedWidget widget,
- const SkBitmap& image,
- const gfx::Point& location) {
- cursor_bitmap_ = image;
+ const std::vector<SkBitmap>& bitmaps,
+ const gfx::Point& location,
+ int frame_delay_ms) {
+ cursor_bitmaps_ = bitmaps;
cursor_location_ = location;
+ cursor_frame_delay_ms_ = frame_delay_ms;
+
+ if (bitmaps.size() > 1)
+ NOTIMPLEMENTED(); // No animation of animated cursors.
if (state_ != INITIALIZED)
return;
@@ -141,10 +146,10 @@ void DriSurfaceFactory::ResetCursor(gfx::AcceleratedWidget widget) {
HardwareDisplayController* controller =
window_manager_->GetWindowDelegate(widget)->GetController();
- if (!cursor_bitmap_.empty()) {
+ if (cursor_bitmaps_.size()) {
// Draw new cursor into backbuffer.
UpdateCursorImage(cursor_buffers_[cursor_frontbuffer_ ^ 1].get(),
- cursor_bitmap_);
+ cursor_bitmaps_[0]);
// Reset location & buffer.
if (controller) {
« no previous file with comments | « ui/ozone/platform/dri/dri_surface_factory.h ('k') | ui/ozone/platform/dri/dri_surface_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698