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 2296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2307 // immediately. | 2307 // immediately. |
2308 return true; | 2308 return true; |
2309 } | 2309 } |
2310 } | 2310 } |
2311 | 2311 |
2312 // If the window occlusion API is not present then ack frames when we draw | 2312 // If the window occlusion API is not present then ack frames when we draw |
2313 // them. | 2313 // them. |
2314 return false; | 2314 return false; |
2315 } | 2315 } |
2316 | 2316 |
2317 void RenderWidgetHostViewMac::AcceleratedLayerDidDrawFrame(bool succeeded) { | 2317 void RenderWidgetHostViewMac::AcceleratedLayerDidDrawFrame() { |
2318 if (!render_widget_host_) | 2318 if (!render_widget_host_) |
2319 return; | 2319 return; |
2320 | 2320 |
2321 SendPendingLatencyInfoToHost(); | 2321 SendPendingLatencyInfoToHost(); |
2322 SendPendingSwapAck(); | 2322 SendPendingSwapAck(); |
2323 if (!succeeded) | 2323 } |
2324 GotAcceleratedCompositingError(); | 2324 |
| 2325 void RenderWidgetHostViewMac::AcceleratedLayerHitError() { |
| 2326 if (!render_widget_host_) |
| 2327 return; |
| 2328 // Perform all acks that would have been done if the frame had succeeded, to |
| 2329 // un-block the renderer. |
| 2330 AcceleratedLayerDidDrawFrame(); |
| 2331 GotAcceleratedCompositingError(); |
2325 } | 2332 } |
2326 | 2333 |
2327 //////////////////////////////////////////////////////////////////////////////// | 2334 //////////////////////////////////////////////////////////////////////////////// |
2328 // gfx::DisplayObserver, public: | 2335 // gfx::DisplayObserver, public: |
2329 | 2336 |
2330 void RenderWidgetHostViewMac::OnDisplayAdded(const gfx::Display& display) { | 2337 void RenderWidgetHostViewMac::OnDisplayAdded(const gfx::Display& display) { |
2331 } | 2338 } |
2332 | 2339 |
2333 void RenderWidgetHostViewMac::OnDisplayRemoved(const gfx::Display& display) { | 2340 void RenderWidgetHostViewMac::OnDisplayRemoved(const gfx::Display& display) { |
2334 } | 2341 } |
(...skipping 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4037 | 4044 |
4038 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding | 4045 // "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding |
4039 // regions that are not draggable. (See ControlRegionView in | 4046 // regions that are not draggable. (See ControlRegionView in |
4040 // native_app_window_cocoa.mm). This requires the render host view to be | 4047 // native_app_window_cocoa.mm). This requires the render host view to be |
4041 // draggable by default. | 4048 // draggable by default. |
4042 - (BOOL)mouseDownCanMoveWindow { | 4049 - (BOOL)mouseDownCanMoveWindow { |
4043 return YES; | 4050 return YES; |
4044 } | 4051 } |
4045 | 4052 |
4046 @end | 4053 @end |
OLD | NEW |