| OLD | NEW |
| 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 | 10 |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 int output_surface_id, | 452 int output_surface_id, |
| 453 const cc::CompositorFrameAck& ack) { | 453 const cc::CompositorFrameAck& ack) { |
| 454 render_widget_host_->Send(new ViewMsg_ReclaimCompositorResources( | 454 render_widget_host_->Send(new ViewMsg_ReclaimCompositorResources( |
| 455 render_widget_host_->GetRoutingID(), output_surface_id, ack)); | 455 render_widget_host_->GetRoutingID(), output_surface_id, ack)); |
| 456 } | 456 } |
| 457 | 457 |
| 458 void RenderWidgetHostViewMac::DelegatedFrameHostOnLostCompositorResources() { | 458 void RenderWidgetHostViewMac::DelegatedFrameHostOnLostCompositorResources() { |
| 459 render_widget_host_->ScheduleComposite(); | 459 render_widget_host_->ScheduleComposite(); |
| 460 } | 460 } |
| 461 | 461 |
| 462 void RenderWidgetHostViewMac::DelegatedFrameHostUpdateVSyncParameters( |
| 463 const base::TimeTicks& timebase, |
| 464 const base::TimeDelta& interval) { |
| 465 render_widget_host_->UpdateVSyncParameters(timebase, interval); |
| 466 } |
| 467 |
| 462 //////////////////////////////////////////////////////////////////////////////// | 468 //////////////////////////////////////////////////////////////////////////////// |
| 463 // AcceleratedWidgetMacNSView, public: | 469 // AcceleratedWidgetMacNSView, public: |
| 464 | 470 |
| 465 NSView* RenderWidgetHostViewMac::AcceleratedWidgetGetNSView() const { | 471 NSView* RenderWidgetHostViewMac::AcceleratedWidgetGetNSView() const { |
| 466 return cocoa_view_; | 472 return cocoa_view_; |
| 467 } | 473 } |
| 468 | 474 |
| 469 bool RenderWidgetHostViewMac::AcceleratedWidgetShouldIgnoreBackpressure() | 475 bool RenderWidgetHostViewMac::AcceleratedWidgetShouldIgnoreBackpressure() |
| 470 const { | 476 const { |
| 471 // If vsync is disabled, then always draw and ack frames immediately. | 477 // If vsync is disabled, then always draw and ack frames immediately. |
| (...skipping 3012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3484 | 3490 |
| 3485 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3491 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
| 3486 // regions that are not draggable. (See ControlRegionView in | 3492 // regions that are not draggable. (See ControlRegionView in |
| 3487 // native_app_window_cocoa.mm). This requires the render host view to be | 3493 // native_app_window_cocoa.mm). This requires the render host view to be |
| 3488 // draggable by default. | 3494 // draggable by default. |
| 3489 - (BOOL)mouseDownCanMoveWindow { | 3495 - (BOOL)mouseDownCanMoveWindow { |
| 3490 return YES; | 3496 return YES; |
| 3491 } | 3497 } |
| 3492 | 3498 |
| 3493 @end | 3499 @end |
| OLD | NEW |