OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <QuartzCore/QuartzCore.h> | 5 #include <QuartzCore/QuartzCore.h> |
6 | 6 |
7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" | 7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" |
8 | 8 |
9 #include "app/app_switches.h" | 9 #include "app/app_switches.h" |
10 #include "app/surface/io_surface_support_mac.h" | 10 #include "app/surface/io_surface_support_mac.h" |
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 void RenderWidgetHostViewMac::GpuRenderingStateDidChange() { | 1240 void RenderWidgetHostViewMac::GpuRenderingStateDidChange() { |
1241 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1241 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1242 if (GetRenderWidgetHost()->is_accelerated_compositing_active()) { | 1242 if (GetRenderWidgetHost()->is_accelerated_compositing_active()) { |
1243 UpdateRootGpuViewVisibility( | 1243 UpdateRootGpuViewVisibility( |
1244 GetRenderWidgetHost()->is_accelerated_compositing_active()); | 1244 GetRenderWidgetHost()->is_accelerated_compositing_active()); |
1245 } else { | 1245 } else { |
1246 needs_gpu_visibility_update_after_repaint_ = true; | 1246 needs_gpu_visibility_update_after_repaint_ = true; |
1247 } | 1247 } |
1248 } | 1248 } |
1249 | 1249 |
| 1250 gfx::PluginWindowHandle RenderWidgetHostViewMac::AcquireCompositingSurface() { |
| 1251 return AllocateFakePluginWindowHandle(/*opaque=*/true, /*root=*/true); |
| 1252 } |
| 1253 |
| 1254 void RenderWidgetHostViewMac::ReleaseCompositingSurface( |
| 1255 gfx::PluginWindowHandle surface) { |
| 1256 DestroyFakePluginWindowHandle(surface); |
| 1257 } |
| 1258 |
1250 void RenderWidgetHostViewMac::DrawAcceleratedSurfaceInstance( | 1259 void RenderWidgetHostViewMac::DrawAcceleratedSurfaceInstance( |
1251 CGLContextObj context, | 1260 CGLContextObj context, |
1252 gfx::PluginWindowHandle plugin_handle, | 1261 gfx::PluginWindowHandle plugin_handle, |
1253 NSSize size) { | 1262 NSSize size) { |
1254 // Called on the display link thread. | 1263 // Called on the display link thread. |
1255 CGLSetCurrentContext(context); | 1264 CGLSetCurrentContext(context); |
1256 | 1265 |
1257 glMatrixMode(GL_PROJECTION); | 1266 glMatrixMode(GL_PROJECTION); |
1258 glLoadIdentity(); | 1267 glLoadIdentity(); |
1259 // Note that we place the origin at the upper left corner with +y | 1268 // Note that we place the origin at the upper left corner with +y |
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2826 if (!string) return NO; | 2835 if (!string) return NO; |
2827 | 2836 |
2828 // If the user is currently using an IME, confirm the IME input, | 2837 // If the user is currently using an IME, confirm the IME input, |
2829 // and then insert the text from the service, the same as TextEdit and Safari. | 2838 // and then insert the text from the service, the same as TextEdit and Safari. |
2830 [self confirmComposition]; | 2839 [self confirmComposition]; |
2831 [self insertText:string]; | 2840 [self insertText:string]; |
2832 return YES; | 2841 return YES; |
2833 } | 2842 } |
2834 | 2843 |
2835 @end | 2844 @end |
OLD | NEW |