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

Unified Diff: ui/ozone/platform/egltest/ozone_platform_egltest.cc

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/demo/renderer_base.cc ('k') | ui/views/animation/ink_drop_animation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/egltest/ozone_platform_egltest.cc
diff --git a/ui/ozone/platform/egltest/ozone_platform_egltest.cc b/ui/ozone/platform/egltest/ozone_platform_egltest.cc
index 447d3a346b184a156cbfc217b8c13a01efe82ae2..371ba339e323b24303e981fb98aca9e2bc7d5c75 100644
--- a/ui/ozone/platform/egltest/ozone_platform_egltest.cc
+++ b/ui/ozone/platform/egltest/ozone_platform_egltest.cc
@@ -59,7 +59,7 @@ void ScaleTouchEvent(TouchEvent* event, const gfx::SizeF& size) {
for (const auto& device :
DeviceDataManager::GetInstance()->touchscreen_devices()) {
if (device.id == event->source_device_id()) {
- gfx::SizeF touchscreen_size = device.size;
+ gfx::SizeF touchscreen_size = gfx::SizeF(device.size);
gfx::PointF location = event->location_f();
location.Scale(size.width() / touchscreen_size.width(),
@@ -194,8 +194,10 @@ bool EgltestWindow::CanDispatchEvent(const ui::PlatformEvent& ne) {
uint32_t EgltestWindow::DispatchEvent(const ui::PlatformEvent& native_event) {
DCHECK(native_event);
Event* event = static_cast<Event*>(native_event);
- if (event->IsTouchEvent())
- ScaleTouchEvent(static_cast<TouchEvent*>(event), bounds_.size());
+ if (event->IsTouchEvent()) {
+ ScaleTouchEvent(static_cast<TouchEvent*>(event),
+ gfx::SizeF(bounds_.size()));
+ }
DispatchEventFromNativeUiEvent(
native_event, base::Bind(&PlatformWindowDelegate::DispatchEvent,
« no previous file with comments | « ui/ozone/demo/renderer_base.cc ('k') | ui/views/animation/ink_drop_animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698