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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 return true; | 1081 return true; |
1082 } | 1082 } |
1083 | 1083 |
1084 void RenderWidgetHostViewMac::AckPendingSwapBuffers() { | 1084 void RenderWidgetHostViewMac::AckPendingSwapBuffers() { |
1085 TRACE_EVENT0("browser", "RenderWidgetHostViewMac::AckPendingSwapBuffers"); | 1085 TRACE_EVENT0("browser", "RenderWidgetHostViewMac::AckPendingSwapBuffers"); |
1086 while (!pending_swap_buffers_acks_.empty()) { | 1086 while (!pending_swap_buffers_acks_.empty()) { |
1087 if (pending_swap_buffers_acks_.front().first != 0) { | 1087 if (pending_swap_buffers_acks_.front().first != 0) { |
1088 RenderWidgetHostImpl::AcknowledgeBufferPresent( | 1088 RenderWidgetHostImpl::AcknowledgeBufferPresent( |
1089 pending_swap_buffers_acks_.front().first, | 1089 pending_swap_buffers_acks_.front().first, |
1090 pending_swap_buffers_acks_.front().second, | 1090 pending_swap_buffers_acks_.front().second, |
1091 true, | 1091 0, |
1092 0); | 1092 0); |
1093 if (render_widget_host_) { | 1093 if (render_widget_host_) { |
1094 render_widget_host_->AcknowledgeSwapBuffersToRenderer(); | 1094 render_widget_host_->AcknowledgeSwapBuffersToRenderer(); |
1095 | 1095 |
1096 // Send VSync parameters to compositor thread. | 1096 // Send VSync parameters to compositor thread. |
1097 if (compositing_iosurface_.get()) { | 1097 if (compositing_iosurface_.get()) { |
1098 base::TimeTicks timebase; | 1098 base::TimeTicks timebase; |
1099 uint32 numerator = 0, denominator = 0; | 1099 uint32 numerator = 0, denominator = 0; |
1100 compositing_iosurface_->GetVSyncParameters(&timebase, | 1100 compositing_iosurface_->GetVSyncParameters(&timebase, |
1101 &numerator, | 1101 &numerator, |
(...skipping 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3377 if (!string) return NO; | 3377 if (!string) return NO; |
3378 | 3378 |
3379 // If the user is currently using an IME, confirm the IME input, | 3379 // If the user is currently using an IME, confirm the IME input, |
3380 // and then insert the text from the service, the same as TextEdit and Safari. | 3380 // and then insert the text from the service, the same as TextEdit and Safari. |
3381 [self confirmComposition]; | 3381 [self confirmComposition]; |
3382 [self insertText:string]; | 3382 [self insertText:string]; |
3383 return YES; | 3383 return YES; |
3384 } | 3384 } |
3385 | 3385 |
3386 @end | 3386 @end |
OLD | NEW |