| 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 #ifndef CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // The "GPU plugin" is currently implemented as a special kind of | 9 // The "GPU plugin" is currently implemented as a special kind of |
| 10 // NPAPI plugin to provide high-performance on-screen 3D rendering for | 10 // NPAPI plugin to provide high-performance on-screen 3D rendering for |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 // The IOSurfaceRef, if any, that has been handed from the GPU | 94 // The IOSurfaceRef, if any, that has been handed from the GPU |
| 95 // plugin process back to the browser process for drawing. | 95 // plugin process back to the browser process for drawing. |
| 96 // This is held as a CFTypeRef because we can't refer to the | 96 // This is held as a CFTypeRef because we can't refer to the |
| 97 // IOSurfaceRef type when building on 10.5. | 97 // IOSurfaceRef type when building on 10.5. |
| 98 base::mac::ScopedCFTypeRef<CFTypeRef> surface_; | 98 base::mac::ScopedCFTypeRef<CFTypeRef> surface_; |
| 99 | 99 |
| 100 // The id of |surface_|, or 0 if |surface_| is NULL. | 100 // The id of |surface_|, or 0 if |surface_| is NULL. |
| 101 uint64 surface_id_; | 101 uint64 surface_id_; |
| 102 | 102 |
| 103 // The width and height of the io surface. During resizing, this is different |
| 104 // from |width_| and |height_|. |
| 105 int32 surface_width_; |
| 106 int32 surface_height_; |
| 107 |
| 103 // The TransportDIB which is used in pre-10.6 systems where the IOSurface | 108 // The TransportDIB which is used in pre-10.6 systems where the IOSurface |
| 104 // API is not supported. This is a weak reference to the actual TransportDIB | 109 // API is not supported. This is a weak reference to the actual TransportDIB |
| 105 // whic is owned by the GPU process. | 110 // whic is owned by the GPU process. |
| 106 scoped_ptr<TransportDIB> transport_dib_; | 111 scoped_ptr<TransportDIB> transport_dib_; |
| 107 | 112 |
| 108 // The width and height of the surface. | 113 // The width and height of the container. |
| 109 int32 width_; | 114 int32 width_; |
| 110 int32 height_; | 115 int32 height_; |
| 111 | 116 |
| 112 // The clip rectangle, relative to the (x_, y_) origin. | 117 // The clip rectangle, relative to the (x_, y_) origin. |
| 113 gfx::Rect clipRect_; | 118 gfx::Rect clipRect_; |
| 114 | 119 |
| 115 // The "live" OpenGL texture referring to this IOSurfaceRef. Note | 120 // The "live" OpenGL texture referring to this IOSurfaceRef. Note |
| 116 // that per the CGLTexImageIOSurface2D API we do not need to | 121 // that per the CGLTexImageIOSurface2D API we do not need to |
| 117 // explicitly update this texture's contents once created. All we | 122 // explicitly update this texture's contents once created. All we |
| 118 // need to do is ensure it is re-bound before attempting to draw | 123 // need to do is ensure it is re-bound before attempting to draw |
| (...skipping 18 matching lines...) Expand all Loading... |
| 137 void ReleaseIOSurface(); | 142 void ReleaseIOSurface(); |
| 138 | 143 |
| 139 // Enqueue our texture for later deletion. | 144 // Enqueue our texture for later deletion. |
| 140 void EnqueueTextureForDeletion(); | 145 void EnqueueTextureForDeletion(); |
| 141 | 146 |
| 142 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerMac); | 147 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerMac); |
| 143 }; | 148 }; |
| 144 | 149 |
| 145 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ | 150 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ |
| 146 | 151 |
| OLD | NEW |