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 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 // When making an element on the page fullscreen the element's background | 413 // When making an element on the page fullscreen the element's background |
414 // may not match the page's, so use black as the gutter color to avoid | 414 // may not match the page's, so use black as the gutter color to avoid |
415 // flashes of brighter colors during the transition. | 415 // flashes of brighter colors during the transition. |
416 if (render_widget_host_->delegate() && | 416 if (render_widget_host_->delegate() && |
417 render_widget_host_->delegate()->IsFullscreenForCurrentTab()) { | 417 render_widget_host_->delegate()->IsFullscreenForCurrentTab()) { |
418 return SK_ColorBLACK; | 418 return SK_ColorBLACK; |
419 } | 419 } |
420 return color; | 420 return color; |
421 } | 421 } |
422 | 422 |
423 void RenderWidgetHostViewMac::BrowserCompositorMacSendCompositorSwapAck( | |
424 int output_surface_id, | |
425 const cc::CompositorFrameAck& ack) { | |
426 render_widget_host_->Send(new ViewMsg_SwapCompositorFrameAck( | |
427 render_widget_host_->GetRoutingID(), output_surface_id, ack)); | |
428 } | |
429 | |
430 void RenderWidgetHostViewMac:: | 423 void RenderWidgetHostViewMac:: |
431 BrowserCompositorMacSendReclaimCompositorResources( | 424 BrowserCompositorMacSendReclaimCompositorResources( |
432 int output_surface_id, | 425 int output_surface_id, |
433 const cc::CompositorFrameAck& ack) { | 426 bool is_swap_ack, |
| 427 const cc::ReturnedResourceArray& resources) { |
434 render_widget_host_->Send(new ViewMsg_ReclaimCompositorResources( | 428 render_widget_host_->Send(new ViewMsg_ReclaimCompositorResources( |
435 render_widget_host_->GetRoutingID(), output_surface_id, ack)); | 429 render_widget_host_->GetRoutingID(), output_surface_id, is_swap_ack, |
| 430 resources)); |
436 } | 431 } |
437 | 432 |
438 void RenderWidgetHostViewMac::BrowserCompositorMacOnLostCompositorResources() { | 433 void RenderWidgetHostViewMac::BrowserCompositorMacOnLostCompositorResources() { |
439 render_widget_host_->ScheduleComposite(); | 434 render_widget_host_->ScheduleComposite(); |
440 } | 435 } |
441 | 436 |
442 void RenderWidgetHostViewMac::BrowserCompositorMacUpdateVSyncParameters( | 437 void RenderWidgetHostViewMac::BrowserCompositorMacUpdateVSyncParameters( |
443 const base::TimeTicks& timebase, | 438 const base::TimeTicks& timebase, |
444 const base::TimeDelta& interval) { | 439 const base::TimeDelta& interval) { |
445 render_widget_host_->UpdateVSyncParameters(timebase, interval); | 440 render_widget_host_->UpdateVSyncParameters(timebase, interval); |
(...skipping 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3232 | 3227 |
3233 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 3228 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
3234 // regions that are not draggable. (See ControlRegionView in | 3229 // regions that are not draggable. (See ControlRegionView in |
3235 // native_app_window_cocoa.mm). This requires the render host view to be | 3230 // native_app_window_cocoa.mm). This requires the render host view to be |
3236 // draggable by default. | 3231 // draggable by default. |
3237 - (BOOL)mouseDownCanMoveWindow { | 3232 - (BOOL)mouseDownCanMoveWindow { |
3238 return YES; | 3233 return YES; |
3239 } | 3234 } |
3240 | 3235 |
3241 @end | 3236 @end |
OLD | NEW |