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

Side by Side Diff: ui/ozone/platform/drm/host/drm_window_host.cc

Issue 922843002: Fix software mirror mode on Ozone part 2/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « ui/events/devices/x11/device_data_manager_x11.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/ozone/platform/drm/host/drm_window_host.h" 5 #include "ui/ozone/platform/drm/host/drm_window_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/events/devices/device_data_manager.h" 8 #include "ui/events/devices/device_data_manager.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/ozone/evdev/event_factory_evdev.h" 10 #include "ui/events/ozone/evdev/event_factory_evdev.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 gfx::AcceleratedWidget grabber = window_manager_->event_grabber(); 126 gfx::AcceleratedWidget grabber = window_manager_->event_grabber();
127 if (grabber != gfx::kNullAcceleratedWidget) 127 if (grabber != gfx::kNullAcceleratedWidget)
128 return grabber == widget_; 128 return grabber == widget_;
129 129
130 if (event->IsTouchEvent()) { 130 if (event->IsTouchEvent()) {
131 // Dispatch the event if it is from the touchscreen associated with the 131 // Dispatch the event if it is from the touchscreen associated with the
132 // DrmWindowHost. We cannot check the event's location because if the 132 // DrmWindowHost. We cannot check the event's location because if the
133 // touchscreen has a bezel, touches in the bezel have a location outside of 133 // touchscreen has a bezel, touches in the bezel have a location outside of
134 // |bounds_|. 134 // |bounds_|.
135 int64_t display_id = 135 int64_t display_id =
136 DeviceDataManager::GetInstance()->GetDisplayForTouchDevice( 136 DeviceDataManager::GetInstance()->GetTargetDisplayForTouchDevice(
137 event->source_device_id()); 137 event->source_device_id());
138 138
139 if (display_id == gfx::Display::kInvalidDisplayID) 139 if (display_id == gfx::Display::kInvalidDisplayID)
140 return false; 140 return false;
141 141
142 DisplaySnapshot* snapshot = display_manager_->GetDisplay(display_id); 142 DisplaySnapshot* snapshot = display_manager_->GetDisplay(display_id);
143 if (!snapshot || !snapshot->current_mode()) 143 if (!snapshot || !snapshot->current_mode())
144 return false; 144 return false;
145 145
146 gfx::Rect display_bounds(snapshot->origin(), 146 gfx::Rect display_bounds(snapshot->origin(),
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 void DrmWindowHost::OnChannelDestroyed() { 182 void DrmWindowHost::OnChannelDestroyed() {
183 } 183 }
184 184
185 void DrmWindowHost::SendBoundsChange() { 185 void DrmWindowHost::SendBoundsChange() {
186 cursor_->PrepareForBoundsChange(widget_); 186 cursor_->PrepareForBoundsChange(widget_);
187 sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_)); 187 sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_));
188 cursor_->CommitBoundsChange(widget_, bounds_, GetCursorConfinedBounds()); 188 cursor_->CommitBoundsChange(widget_, bounds_, GetCursorConfinedBounds());
189 } 189 }
190 190
191 } // namespace ui 191 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/devices/x11/device_data_manager_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698