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

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

Issue 545043003: ozone: dri: Implement cursor animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops, undid it wrong 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 | « no previous file | ui/ozone/platform/dri/dri_surface_factory.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.h
diff --git a/ui/ozone/platform/dri/dri_surface_factory.h b/ui/ozone/platform/dri/dri_surface_factory.h
index 6a377bc99be6645d9cbd6e122e9e50643b529e59..11d0151d9ace5194e0d1ad7165d3f652b9c2dc2f 100644
--- a/ui/ozone/platform/dri/dri_surface_factory.h
+++ b/ui/ozone/platform/dri/dri_surface_factory.h
@@ -8,6 +8,7 @@
#include <map>
#include "base/memory/scoped_ptr.h"
+#include "base/timer/timer.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/ozone/platform/dri/hardware_cursor_delegate.h"
#include "ui/ozone/public/surface_factory_ozone.h"
@@ -63,7 +64,10 @@ class DriSurfaceFactory : public SurfaceFactoryOzone,
protected:
// Draw the last set cursor & update the cursor plane.
- void ResetCursor(gfx::AcceleratedWidget w);
+ void ResetCursor();
+
+ // Draw next frame in an animated cursor.
+ void OnCursorAnimationTimeout();
DriWrapper* drm_; // Not owned.
ScreenManager* screen_manager_; // Not owned.
@@ -73,9 +77,12 @@ class DriSurfaceFactory : public SurfaceFactoryOzone,
scoped_refptr<DriBuffer> cursor_buffers_[2];
int cursor_frontbuffer_;
+ gfx::AcceleratedWidget cursor_widget_;
std::vector<SkBitmap> cursor_bitmaps_;
gfx::Point cursor_location_;
+ int cursor_frame_;
int cursor_frame_delay_ms_;
+ base::RepeatingTimer<DriSurfaceFactory> cursor_timer_;
DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory);
};
« no previous file with comments | « no previous file | ui/ozone/platform/dri/dri_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698