| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H |
| 6 #define CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H | 6 #define CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include <QuartzCore/QuartzCore.h> | 9 #include <QuartzCore/QuartzCore.h> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // | 33 // |
| 34 // No code should ever try to acquire a lock further up in the hierarchy if it | 34 // No code should ever try to acquire a lock further up in the hierarchy if it |
| 35 // already owns a lower lock. For example, while the CGL lock is taken, no | 35 // already owns a lower lock. For example, while the CGL lock is taken, no |
| 36 // CVDisplayLink* functions must be called. | 36 // CVDisplayLink* functions must be called. |
| 37 @interface AcceleratedPluginView : NSView { | 37 @interface AcceleratedPluginView : NSView { |
| 38 scoped_nsobject<NSOpenGLPixelFormat> glPixelFormat_; | 38 scoped_nsobject<NSOpenGLPixelFormat> glPixelFormat_; |
| 39 CGLPixelFormatObj cglPixelFormat_; // weak, backed by |glPixelFormat_|. | 39 CGLPixelFormatObj cglPixelFormat_; // weak, backed by |glPixelFormat_|. |
| 40 scoped_nsobject<NSOpenGLContext> glContext_; | 40 scoped_nsobject<NSOpenGLContext> glContext_; |
| 41 CGLContextObj cglContext_; // weak, backed by |glContext_|. | 41 CGLContextObj cglContext_; // weak, backed by |glContext_|. |
| 42 | 42 |
| 43 CVDisplayLinkRef displayLink_; // Owned by us. | 43 //CVDisplayLinkRef displayLink_; // Owned by us. |
| 44 | 44 |
| 45 RenderWidgetHostViewMac* renderWidgetHostView_; // weak | 45 RenderWidgetHostViewMac* renderWidgetHostView_; // weak |
| 46 gfx::PluginWindowHandle pluginHandle_; // weak | 46 gfx::PluginWindowHandle pluginHandle_; // weak |
| 47 | 47 |
| 48 // The number of swap buffers calls that have been requested by the | 48 // The number of swap buffers calls that have been requested by the |
| 49 // GPU process, or a monotonically increasing number of calls to | 49 // GPU process, or a monotonically increasing number of calls to |
| 50 // updateSwapBuffersCount:fromRenderer:routeId: if the update came | 50 // updateSwapBuffersCount:fromRenderer:routeId: if the update came |
| 51 // from an accelerated plugin. | 51 // from an accelerated plugin. |
| 52 uint64 swapBuffersCount_; | 52 uint64 swapBuffersCount_; |
| 53 // The number of swap buffers calls that have been processed by the | 53 // The number of swap buffers calls that have been processed by the |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // RHWVCocoa gets dealloc'd, which means the AcceleratedPluginView child views | 98 // RHWVCocoa gets dealloc'd, which means the AcceleratedPluginView child views |
| 99 // can be around a little longer than the RWHVMac. This is called when the | 99 // can be around a little longer than the RWHVMac. This is called when the |
| 100 // RWHVMac is about to be deleted (but it's still valid while this method runs). | 100 // RWHVMac is about to be deleted (but it's still valid while this method runs). |
| 101 - (void)onRenderWidgetHostViewGone; | 101 - (void)onRenderWidgetHostViewGone; |
| 102 | 102 |
| 103 // This _must_ be atomic, since it's accessed from several threads. | 103 // This _must_ be atomic, since it's accessed from several threads. |
| 104 @property NSSize cachedSize; | 104 @property NSSize cachedSize; |
| 105 @end | 105 @end |
| 106 | 106 |
| 107 #endif // CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H | 107 #endif // CHROME_BROWSER_RENDERER_HOST_ACCELERATED_PLUGIN_VIEW_MAC_H |
| OLD | NEW |