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 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 return true; | 1030 return true; |
1031 } | 1031 } |
1032 | 1032 |
1033 void RenderWidgetHostViewMac::AckPendingSwapBuffers() { | 1033 void RenderWidgetHostViewMac::AckPendingSwapBuffers() { |
1034 TRACE_EVENT0("browser", "RenderWidgetHostViewMac::AckPendingSwapBuffers"); | 1034 TRACE_EVENT0("browser", "RenderWidgetHostViewMac::AckPendingSwapBuffers"); |
1035 while (!pending_swap_buffers_acks_.empty()) { | 1035 while (!pending_swap_buffers_acks_.empty()) { |
1036 if (pending_swap_buffers_acks_.front().first != 0) { | 1036 if (pending_swap_buffers_acks_.front().first != 0) { |
1037 RenderWidgetHostImpl::AcknowledgeBufferPresent( | 1037 RenderWidgetHostImpl::AcknowledgeBufferPresent( |
1038 pending_swap_buffers_acks_.front().first, | 1038 pending_swap_buffers_acks_.front().first, |
1039 pending_swap_buffers_acks_.front().second, | 1039 pending_swap_buffers_acks_.front().second, |
| 1040 true, |
1040 0); | 1041 0); |
1041 if (render_widget_host_) { | 1042 if (render_widget_host_) { |
1042 render_widget_host_->AcknowledgeSwapBuffersToRenderer(); | 1043 render_widget_host_->AcknowledgeSwapBuffersToRenderer(); |
1043 | 1044 |
1044 // Send VSync parameters to compositor thread. | 1045 // Send VSync parameters to compositor thread. |
1045 if (compositing_iosurface_.get()) { | 1046 if (compositing_iosurface_.get()) { |
1046 base::TimeTicks timebase; | 1047 base::TimeTicks timebase; |
1047 uint32 numerator = 0, denominator = 0; | 1048 uint32 numerator = 0, denominator = 0; |
1048 compositing_iosurface_->GetVSyncParameters(&timebase, | 1049 compositing_iosurface_->GetVSyncParameters(&timebase, |
1049 &numerator, | 1050 &numerator, |
(...skipping 2252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3302 if (!string) return NO; | 3303 if (!string) return NO; |
3303 | 3304 |
3304 // If the user is currently using an IME, confirm the IME input, | 3305 // If the user is currently using an IME, confirm the IME input, |
3305 // and then insert the text from the service, the same as TextEdit and Safari. | 3306 // and then insert the text from the service, the same as TextEdit and Safari. |
3306 [self confirmComposition]; | 3307 [self confirmComposition]; |
3307 [self insertText:string]; | 3308 [self insertText:string]; |
3308 return YES; | 3309 return YES; |
3309 } | 3310 } |
3310 | 3311 |
3311 @end | 3312 @end |
OLD | NEW |