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

Side by Side Diff: ui/ozone/platform/dri/dri_window_delegate_impl.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_
6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ 6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "ui/gfx/geometry/point.h" 10 #include "ui/gfx/geometry/point.h"
(...skipping 26 matching lines...) Expand all
37 gfx::AcceleratedWidget GetAcceleratedWidget() override; 37 gfx::AcceleratedWidget GetAcceleratedWidget() override;
38 HardwareDisplayController* GetController() override; 38 HardwareDisplayController* GetController() override;
39 void OnBoundsChanged(const gfx::Rect& bounds) override; 39 void OnBoundsChanged(const gfx::Rect& bounds) override;
40 void SetCursor(const std::vector<SkBitmap>& bitmaps, 40 void SetCursor(const std::vector<SkBitmap>& bitmaps,
41 const gfx::Point& location, 41 const gfx::Point& location,
42 int frame_delay_ms) override; 42 int frame_delay_ms) override;
43 void MoveCursor(const gfx::Point& location) override; 43 void MoveCursor(const gfx::Point& location) override;
44 44
45 private: 45 private:
46 // Draw the last set cursor & update the cursor plane. 46 // Draw the last set cursor & update the cursor plane.
47 void ResetCursor(); 47 void ResetCursor(bool bitmap_only);
48 48
49 // Draw next frame in an animated cursor. 49 // Draw next frame in an animated cursor.
50 void OnCursorAnimationTimeout(); 50 void OnCursorAnimationTimeout();
51 51
52 gfx::AcceleratedWidget widget_; 52 gfx::AcceleratedWidget widget_;
53 53
54 DriWrapper* drm_; // Not owned. 54 DriWrapper* drm_; // Not owned.
55 DriWindowDelegateManager* window_manager_; // Not owned. 55 DriWindowDelegateManager* window_manager_; // Not owned.
56 ScreenManager* screen_manager_; // Not owned. 56 ScreenManager* screen_manager_; // Not owned.
57 57
58 base::WeakPtr<HardwareDisplayController> controller_; 58 base::WeakPtr<HardwareDisplayController> controller_;
59 59
60 base::RepeatingTimer<DriWindowDelegateImpl> cursor_timer_; 60 base::RepeatingTimer<DriWindowDelegateImpl> cursor_timer_;
61 61
62 scoped_refptr<DriBuffer> cursor_buffers_[2]; 62 scoped_refptr<DriBuffer> cursor_buffers_[2];
63 int cursor_frontbuffer_; 63 int cursor_frontbuffer_;
64 64
65 std::vector<SkBitmap> cursor_bitmaps_; 65 std::vector<SkBitmap> cursor_bitmaps_;
66 gfx::Point cursor_location_; 66 gfx::Point cursor_location_;
67 int cursor_frame_; 67 int cursor_frame_;
68 int cursor_frame_delay_ms_; 68 int cursor_frame_delay_ms_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(DriWindowDelegateImpl); 70 DISALLOW_COPY_AND_ASSIGN(DriWindowDelegateImpl);
71 }; 71 };
72 72
73 } // namespace ui 73 } // namespace ui
74 74
75 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ 75 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_gpu_platform_support.cc ('k') | ui/ozone/platform/dri/dri_window_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698