| 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 #include <QuartzCore/QuartzCore.h> | 7 #include <QuartzCore/QuartzCore.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 } | 1118 } |
| 1119 return true; | 1119 return true; |
| 1120 } | 1120 } |
| 1121 | 1121 |
| 1122 void RenderWidgetHostViewMac::AckPendingSwapBuffers() { | 1122 void RenderWidgetHostViewMac::AckPendingSwapBuffers() { |
| 1123 TRACE_EVENT0("browser", "RenderWidgetHostViewMac::AckPendingSwapBuffers"); | 1123 TRACE_EVENT0("browser", "RenderWidgetHostViewMac::AckPendingSwapBuffers"); |
| 1124 while (!pending_swap_buffers_acks_.empty()) { | 1124 while (!pending_swap_buffers_acks_.empty()) { |
| 1125 if (pending_swap_buffers_acks_.front().first != 0) { | 1125 if (pending_swap_buffers_acks_.front().first != 0) { |
| 1126 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; | 1126 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; |
| 1127 ack_params.sync_point = 0; | 1127 ack_params.sync_point = 0; |
| 1128 if (compositing_iosurface_.get()) |
| 1129 ack_params.renderer = compositing_iosurface_->GetRenderer(); |
| 1128 RenderWidgetHostImpl::AcknowledgeBufferPresent( | 1130 RenderWidgetHostImpl::AcknowledgeBufferPresent( |
| 1129 pending_swap_buffers_acks_.front().first, | 1131 pending_swap_buffers_acks_.front().first, |
| 1130 pending_swap_buffers_acks_.front().second, | 1132 pending_swap_buffers_acks_.front().second, |
| 1131 ack_params); | 1133 ack_params); |
| 1132 if (render_widget_host_) { | 1134 if (render_widget_host_) { |
| 1133 render_widget_host_->AcknowledgeSwapBuffersToRenderer(); | 1135 render_widget_host_->AcknowledgeSwapBuffersToRenderer(); |
| 1134 | 1136 |
| 1135 // Send VSync parameters to compositor thread. | 1137 // Send VSync parameters to compositor thread. |
| 1136 if (compositing_iosurface_.get()) { | 1138 if (compositing_iosurface_.get()) { |
| 1137 base::TimeTicks timebase; | 1139 base::TimeTicks timebase; |
| (...skipping 2340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3478 if (!string) return NO; | 3480 if (!string) return NO; |
| 3479 | 3481 |
| 3480 // If the user is currently using an IME, confirm the IME input, | 3482 // If the user is currently using an IME, confirm the IME input, |
| 3481 // and then insert the text from the service, the same as TextEdit and Safari. | 3483 // and then insert the text from the service, the same as TextEdit and Safari. |
| 3482 [self confirmComposition]; | 3484 [self confirmComposition]; |
| 3483 [self insertText:string]; | 3485 [self insertText:string]; |
| 3484 return YES; | 3486 return YES; |
| 3485 } | 3487 } |
| 3486 | 3488 |
| 3487 @end | 3489 @end |
| OLD | NEW |