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 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 return true; | 1066 return true; |
1067 } | 1067 } |
1068 | 1068 |
1069 void RenderWidgetHostViewMac::AckPendingSwapBuffers() { | 1069 void RenderWidgetHostViewMac::AckPendingSwapBuffers() { |
1070 TRACE_EVENT0("browser", "RenderWidgetHostViewMac::AckPendingSwapBuffers"); | 1070 TRACE_EVENT0("browser", "RenderWidgetHostViewMac::AckPendingSwapBuffers"); |
1071 while (!pending_swap_buffers_acks_.empty()) { | 1071 while (!pending_swap_buffers_acks_.empty()) { |
1072 if (pending_swap_buffers_acks_.front().first != 0) { | 1072 if (pending_swap_buffers_acks_.front().first != 0) { |
1073 RenderWidgetHostImpl::AcknowledgeBufferPresent( | 1073 RenderWidgetHostImpl::AcknowledgeBufferPresent( |
1074 pending_swap_buffers_acks_.front().first, | 1074 pending_swap_buffers_acks_.front().first, |
1075 pending_swap_buffers_acks_.front().second, | 1075 pending_swap_buffers_acks_.front().second, |
1076 true, | 1076 0, |
1077 0); | 1077 0); |
1078 if (render_widget_host_) { | 1078 if (render_widget_host_) { |
1079 render_widget_host_->AcknowledgeSwapBuffersToRenderer(); | 1079 render_widget_host_->AcknowledgeSwapBuffersToRenderer(); |
1080 | 1080 |
1081 // Send VSync parameters to compositor thread. | 1081 // Send VSync parameters to compositor thread. |
1082 if (compositing_iosurface_.get()) { | 1082 if (compositing_iosurface_.get()) { |
1083 base::TimeTicks timebase; | 1083 base::TimeTicks timebase; |
1084 uint32 numerator = 0, denominator = 0; | 1084 uint32 numerator = 0, denominator = 0; |
1085 compositing_iosurface_->GetVSyncParameters(&timebase, | 1085 compositing_iosurface_->GetVSyncParameters(&timebase, |
1086 &numerator, | 1086 &numerator, |
(...skipping 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3360 if (!string) return NO; | 3360 if (!string) return NO; |
3361 | 3361 |
3362 // If the user is currently using an IME, confirm the IME input, | 3362 // If the user is currently using an IME, confirm the IME input, |
3363 // and then insert the text from the service, the same as TextEdit and Safari. | 3363 // and then insert the text from the service, the same as TextEdit and Safari. |
3364 [self confirmComposition]; | 3364 [self confirmComposition]; |
3365 [self insertText:string]; | 3365 [self insertText:string]; |
3366 return YES; | 3366 return YES; |
3367 } | 3367 } |
3368 | 3368 |
3369 @end | 3369 @end |
OLD | NEW |