OLD | NEW |
---|---|
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 "ash/utility/screenshot_controller.h" | 5 #include "ash/utility/screenshot_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "ash/display/mouse_cursor_event_filter.h" | 9 #include "ash/display/mouse_cursor_event_filter.h" |
10 #include "ash/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 | 153 |
154 gfx::Point pseudo_cursor_point = cursor_location_in_root_; | 154 gfx::Point pseudo_cursor_point = cursor_location_in_root_; |
155 | 155 |
156 // The cursor is above/before region. | 156 // The cursor is above/before region. |
157 if (pseudo_cursor_point.x() == region_.x()) | 157 if (pseudo_cursor_point.x() == region_.x()) |
158 pseudo_cursor_point.Offset(-1, 0); | 158 pseudo_cursor_point.Offset(-1, 0); |
159 | 159 |
160 if (pseudo_cursor_point.y() == region_.y()) | 160 if (pseudo_cursor_point.y() == region_.y()) |
161 pseudo_cursor_point.Offset(0, -1); | 161 pseudo_cursor_point.Offset(0, -1); |
162 | 162 |
163 SkPaint paint; | 163 cc::PaintFlags paint; |
sky
2017/01/26 23:00:13
Similar comment about naming.
| |
164 paint.setAntiAlias(false); | 164 paint.setAntiAlias(false); |
165 paint.setStrokeWidth(1); | 165 paint.setStrokeWidth(1); |
166 paint.setColor(SK_ColorWHITE); | 166 paint.setColor(SK_ColorWHITE); |
167 paint.setBlendMode(SkBlendMode::kSrc); | 167 paint.setBlendMode(SkBlendMode::kSrc); |
168 gfx::Vector2d width(kCursorSize / 2, 0); | 168 gfx::Vector2d width(kCursorSize / 2, 0); |
169 gfx::Vector2d height(0, kCursorSize / 2); | 169 gfx::Vector2d height(0, kCursorSize / 2); |
170 gfx::Vector2d white_x_offset(1, -1); | 170 gfx::Vector2d white_x_offset(1, -1); |
171 gfx::Vector2d white_y_offset(1, -1); | 171 gfx::Vector2d white_y_offset(1, -1); |
172 // Horizontal | 172 // Horizontal |
173 canvas->DrawLine(pseudo_cursor_point - width + white_x_offset, | 173 canvas->DrawLine(pseudo_cursor_point - width + white_x_offset, |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
545 | 545 |
546 void ScreenshotController::OnDisplayMetricsChanged( | 546 void ScreenshotController::OnDisplayMetricsChanged( |
547 const display::Display& display, | 547 const display::Display& display, |
548 uint32_t changed_metrics) {} | 548 uint32_t changed_metrics) {} |
549 | 549 |
550 void ScreenshotController::OnWindowDestroying(aura::Window* window) { | 550 void ScreenshotController::OnWindowDestroying(aura::Window* window) { |
551 SetSelectedWindow(nullptr); | 551 SetSelectedWindow(nullptr); |
552 } | 552 } |
553 | 553 |
554 } // namespace ash | 554 } // namespace ash |
OLD | NEW |