| 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 #import "content/browser/renderer_host/accelerated_plugin_view_mac.h" | 5 #import "content/browser/renderer_host/accelerated_plugin_view_mac.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| 11 #include "content/browser/renderer_host/render_widget_host_view_mac.h" | 11 #include "content/browser/renderer_host/render_widget_host_view_mac.h" |
| 12 #import "content/public/browser/accelerated_window_interface.h" | |
| 13 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 13 #import "ui/base/cocoa/underlay_opengl_hosting_window.h" |
| 14 #include "ui/gfx/gl/gl_context.h" | 14 #include "ui/gfx/gl/gl_context.h" |
| 15 #include "ui/gfx/gl/gl_switches.h" | 15 #include "ui/gfx/gl/gl_switches.h" |
| 16 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 16 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
| 17 | 17 |
| 18 using content::BrowserThread; | 18 using content::BrowserThread; |
| 19 | 19 |
| 20 @interface AcceleratedPluginView(Private) | 20 @interface AcceleratedPluginView(Private) |
| 21 | 21 |
| 22 // Initialize the OpenGL context. | 22 // Initialize the OpenGL context. |
| 23 - (void)initOpenGLContext; | 23 - (void)initOpenGLContext; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 // Draw at beam vsync. | 277 // Draw at beam vsync. |
| 278 GLint swapInterval; | 278 GLint swapInterval; |
| 279 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableGpuVsync)) | 279 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableGpuVsync)) |
| 280 swapInterval = 0; | 280 swapInterval = 0; |
| 281 else | 281 else |
| 282 swapInterval = 1; | 282 swapInterval = 1; |
| 283 [glContext_ setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval]; | 283 [glContext_ setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval]; |
| 284 } | 284 } |
| 285 | 285 |
| 286 @end // @implementation AcceleratedPluginView(Private) | 286 @end // @implementation AcceleratedPluginView(Private) |
| OLD | NEW |