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 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2071 // milliseconds sometimes (!) so this is skipped completely for drawRects | 2071 // milliseconds sometimes (!) so this is skipped completely for drawRects |
2072 // that are triggered by BuffersSwapped messages. | 2072 // that are triggered by BuffersSwapped messages. |
2073 [[NSColor clearColor] set]; | 2073 [[NSColor clearColor] set]; |
2074 NSRectFill(dirtyRect); | 2074 NSRectFill(dirtyRect); |
2075 } | 2075 } |
2076 | 2076 |
2077 // TODO(thakis): Register for backing scale factor change events and pass | 2077 // TODO(thakis): Register for backing scale factor change events and pass |
2078 // that on. | 2078 // that on. |
2079 renderWidgetHostView_->compositing_iosurface_->DrawIOSurface( | 2079 renderWidgetHostView_->compositing_iosurface_->DrawIOSurface( |
2080 self, ScaleFactor(self)); | 2080 self, ScaleFactor(self)); |
| 2081 // For latency_tests.cc: |
| 2082 UNSHIPPED_TRACE_EVENT_INSTANT0("test_gpu", "CompositorSwapBuffersComplete"); |
2081 renderWidgetHostView_->AckPendingSwapBuffers(); | 2083 renderWidgetHostView_->AckPendingSwapBuffers(); |
2082 return; | 2084 return; |
2083 } | 2085 } |
2084 | 2086 |
2085 if (backingStore) { | 2087 if (backingStore) { |
2086 // Note: All coordinates are in view units, not pixels. | 2088 // Note: All coordinates are in view units, not pixels. |
2087 gfx::Rect bitmapRect(0, 0, | 2089 gfx::Rect bitmapRect(0, 0, |
2088 backingStore->size().width(), | 2090 backingStore->size().width(), |
2089 backingStore->size().height()); | 2091 backingStore->size().height()); |
2090 | 2092 |
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3089 if (!string) return NO; | 3091 if (!string) return NO; |
3090 | 3092 |
3091 // If the user is currently using an IME, confirm the IME input, | 3093 // If the user is currently using an IME, confirm the IME input, |
3092 // and then insert the text from the service, the same as TextEdit and Safari. | 3094 // and then insert the text from the service, the same as TextEdit and Safari. |
3093 [self confirmComposition]; | 3095 [self confirmComposition]; |
3094 [self insertText:string]; | 3096 [self insertText:string]; |
3095 return YES; | 3097 return YES; |
3096 } | 3098 } |
3097 | 3099 |
3098 @end | 3100 @end |
OLD | NEW |