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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 2150633002: cc: Pass SurfaceId by const ref in more places (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « content/browser/renderer_host/render_widget_host_view_mac.h ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #import <objc/runtime.h> 7 #import <objc/runtime.h>
8 #include <OpenGL/gl.h> 8 #include <OpenGL/gl.h>
9 #include <QuartzCore/QuartzCore.h> 9 #include <QuartzCore/QuartzCore.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 } 1447 }
1448 1448
1449 void RenderWidgetHostViewMac::ProcessGestureEvent( 1449 void RenderWidgetHostViewMac::ProcessGestureEvent(
1450 const blink::WebGestureEvent& event, 1450 const blink::WebGestureEvent& event,
1451 const ui::LatencyInfo& latency) { 1451 const ui::LatencyInfo& latency) {
1452 render_widget_host_->ForwardGestureEventWithLatencyInfo(event, latency); 1452 render_widget_host_->ForwardGestureEventWithLatencyInfo(event, latency);
1453 } 1453 }
1454 1454
1455 void RenderWidgetHostViewMac::TransformPointToLocalCoordSpace( 1455 void RenderWidgetHostViewMac::TransformPointToLocalCoordSpace(
1456 const gfx::Point& point, 1456 const gfx::Point& point,
1457 cc::SurfaceId original_surface, 1457 const cc::SurfaceId& original_surface,
1458 gfx::Point* transformed_point) { 1458 gfx::Point* transformed_point) {
1459 // Transformations use physical pixels rather than DIP, so conversion 1459 // Transformations use physical pixels rather than DIP, so conversion
1460 // is necessary. 1460 // is necessary.
1461 float scale_factor = display::Screen::GetScreen() 1461 float scale_factor = display::Screen::GetScreen()
1462 ->GetDisplayNearestWindow(cocoa_view_) 1462 ->GetDisplayNearestWindow(cocoa_view_)
1463 .device_scale_factor(); 1463 .device_scale_factor();
1464 gfx::Point point_in_pixels = gfx::ConvertPointToPixel(scale_factor, point); 1464 gfx::Point point_in_pixels = gfx::ConvertPointToPixel(scale_factor, point);
1465 browser_compositor_->GetDelegatedFrameHost()->TransformPointToLocalCoordSpace( 1465 browser_compositor_->GetDelegatedFrameHost()->TransformPointToLocalCoordSpace(
1466 point_in_pixels, original_surface, transformed_point); 1466 point_in_pixels, original_surface, transformed_point);
1467 *transformed_point = gfx::ConvertPointToDIP(scale_factor, *transformed_point); 1467 *transformed_point = gfx::ConvertPointToDIP(scale_factor, *transformed_point);
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after
3232 3232
3233 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding 3233 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
3234 // regions that are not draggable. (See ControlRegionView in 3234 // regions that are not draggable. (See ControlRegionView in
3235 // native_app_window_cocoa.mm). This requires the render host view to be 3235 // native_app_window_cocoa.mm). This requires the render host view to be
3236 // draggable by default. 3236 // draggable by default.
3237 - (BOOL)mouseDownCanMoveWindow { 3237 - (BOOL)mouseDownCanMoveWindow {
3238 return YES; 3238 return YES;
3239 } 3239 }
3240 3240
3241 @end 3241 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698