summaryrefslogtreecommitdiffstats
path: root/ui/ozone/platform/drm/gpu/drm_window.h
diff options
context:
space:
mode:
authordnicoara <dnicoara@chromium.org>2015-04-01 09:41:36 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-01 16:42:57 +0000
commited7491b3e66fd2c7271157e61d9b673971a2a52d (patch)
tree60eb905a878224b14d5a00bffa928ff137a9a57d /ui/ozone/platform/drm/gpu/drm_window.h
parent3e2d63d0413e2f0507f76cbe82cb1a03af451da8 (diff)
downloadchromium_src-ed7491b3e66fd2c7271157e61d9b673971a2a52d.zip
chromium_src-ed7491b3e66fd2c7271157e61d9b673971a2a52d.tar.gz
chromium_src-ed7491b3e66fd2c7271157e61d9b673971a2a52d.tar.bz2
[Ozone-Drm] Update the cursor when displays change
This change updates the logic to update the display the hardware cursor is shown on when windows move and when the display configuration changes. It also moves some of the checks from the UI thread to the GPU process. BUG=470493 Review URL: https://codereview.chromium.org/1041443002 Cr-Commit-Position: refs/heads/master@{#323257}
Diffstat (limited to 'ui/ozone/platform/drm/gpu/drm_window.h')
-rw-r--r--ui/ozone/platform/drm/gpu/drm_window.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/ui/ozone/platform/drm/gpu/drm_window.h b/ui/ozone/platform/drm/gpu/drm_window.h
index aa01ae9..f655bbb 100644
--- a/ui/ozone/platform/drm/gpu/drm_window.h
+++ b/ui/ozone/platform/drm/gpu/drm_window.h
@@ -12,7 +12,6 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/ozone/ozone_export.h"
-#include "ui/ozone/platform/drm/gpu/display_change_observer.h"
class SkBitmap;
@@ -34,13 +33,15 @@ class ScreenManager;
// A window is associated with the display whose bounds contains the window
// bounds. If there's no suitable display, the window is disconnected and its
// contents will not be visible.
-class OZONE_EXPORT DrmWindow : public DisplayChangeObserver {
+class OZONE_EXPORT DrmWindow {
public:
DrmWindow(gfx::AcceleratedWidget widget,
DrmDeviceManager* device_manager,
ScreenManager* screen_manager);
- ~DrmWindow() override;
+ ~DrmWindow();
+
+ gfx::Rect bounds() const { return bounds_; }
void Initialize();
@@ -53,6 +54,8 @@ class OZONE_EXPORT DrmWindow : public DisplayChangeObserver {
// not cache the result as the controller may change as the window is moved.
HardwareDisplayController* GetController();
+ void SetController(HardwareDisplayController* controller);
+
// Called when the window is resized/moved.
void OnBoundsChanged(const gfx::Rect& bounds);
@@ -70,10 +73,6 @@ class OZONE_EXPORT DrmWindow : public DisplayChangeObserver {
// Move the HW cursor to the specified location.
void MoveCursor(const gfx::Point& location);
- // DisplayChangeObserver:
- void OnDisplayChanged(HardwareDisplayController* controller) override;
- void OnDisplayRemoved(HardwareDisplayController* controller) override;
-
private:
// Draw the last set cursor & update the cursor plane.
void ResetCursor(bool bitmap_only);
@@ -81,8 +80,6 @@ class OZONE_EXPORT DrmWindow : public DisplayChangeObserver {
// Draw next frame in an animated cursor.
void OnCursorAnimationTimeout();
- void UpdateWidgetToDrmDeviceMapping();
-
// When |controller_| changes this is called to reallocate the cursor buffers
// since the allocation DRM device may have changed.
void UpdateCursorBuffers();