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