Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/gpu/drm_thread.h" | 5 #include "ui/ozone/platform/drm/gpu/drm_thread.h" |
| 6 | 6 |
| 7 #include <gbm.h> | 7 #include <gbm.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 200 | 200 |
| 201 void DrmThread::SetWindowBounds(gfx::AcceleratedWidget widget, | 201 void DrmThread::SetWindowBounds(gfx::AcceleratedWidget widget, |
| 202 const gfx::Rect& bounds) { | 202 const gfx::Rect& bounds) { |
| 203 screen_manager_->GetWindow(widget)->SetBounds(bounds); | 203 screen_manager_->GetWindow(widget)->SetBounds(bounds); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void DrmThread::SetCursor(const gfx::AcceleratedWidget& widget, | 206 void DrmThread::SetCursor(const gfx::AcceleratedWidget& widget, |
| 207 const std::vector<SkBitmap>& bitmaps, | 207 const std::vector<SkBitmap>& bitmaps, |
| 208 const gfx::Point& location, | 208 const gfx::Point& location, |
| 209 int32_t frame_delay_ms) { | 209 int32_t frame_delay_ms) { |
| 210 screen_manager_->GetWindow(widget) | 210 auto window = screen_manager_->GetWindow(widget); |
|
dnicoara
2017/05/26 15:51:04
Why is this needed? The window lifetime is "manage
| |
| 211 ->SetCursor(bitmaps, location, frame_delay_ms); | 211 if (!window) |
| 212 return; | |
| 213 window->SetCursor(bitmaps, location, frame_delay_ms); | |
| 212 } | 214 } |
| 213 | 215 |
| 214 void DrmThread::MoveCursor(const gfx::AcceleratedWidget& widget, | 216 void DrmThread::MoveCursor(const gfx::AcceleratedWidget& widget, |
| 215 const gfx::Point& location) { | 217 const gfx::Point& location) { |
| 216 screen_manager_->GetWindow(widget)->MoveCursor(location); | 218 screen_manager_->GetWindow(widget)->MoveCursor(location); |
| 217 } | 219 } |
| 218 | 220 |
| 219 void DrmThread::CheckOverlayCapabilities( | 221 void DrmThread::CheckOverlayCapabilities( |
| 220 gfx::AcceleratedWidget widget, | 222 gfx::AcceleratedWidget widget, |
| 221 const std::vector<OverlayCheck_Params>& overlays, | 223 const std::vector<OverlayCheck_Params>& overlays, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 correction_matrix); | 292 correction_matrix); |
| 291 } | 293 } |
| 292 | 294 |
| 293 // DrmThread requires a BindingSet instead of a simple Binding because it will | 295 // DrmThread requires a BindingSet instead of a simple Binding because it will |
| 294 // be used from multiple threads in multiple processes. | 296 // be used from multiple threads in multiple processes. |
| 295 void DrmThread::AddBinding(ozone::mojom::DeviceCursorRequest request) { | 297 void DrmThread::AddBinding(ozone::mojom::DeviceCursorRequest request) { |
| 296 bindings_.AddBinding(this, std::move(request)); | 298 bindings_.AddBinding(this, std::move(request)); |
| 297 } | 299 } |
| 298 | 300 |
| 299 } // namespace ui | 301 } // namespace ui |
| OLD | NEW |