| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H | 6 #define CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_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 |
| 11 #include "base/mac/scoped_cftyperef.h" | 11 #include "base/mac/scoped_cftyperef.h" |
| 12 #include "base/memory/scoped_nsobject.h" | 12 #include "base/memory/scoped_nsobject.h" |
| 13 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
| 14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
| 15 | 15 |
| 16 class IOSurfaceSupport; | 16 class IOSurfaceSupport; |
| 17 | 17 |
| 18 namespace content { |
| 19 |
| 18 // This class manages an OpenGL context and IOSurface for the accelerated | 20 // This class manages an OpenGL context and IOSurface for the accelerated |
| 19 // compositing code path. The GL context is attached to | 21 // compositing code path. The GL context is attached to |
| 20 // RenderWidgetHostViewCocoa for blitting the IOSurface. | 22 // RenderWidgetHostViewCocoa for blitting the IOSurface. |
| 21 class CompositingIOSurfaceMac { | 23 class CompositingIOSurfaceMac { |
| 22 public: | 24 public: |
| 23 // Returns NULL if IOSurface support is missing or GL APIs fail. | 25 // Returns NULL if IOSurface support is missing or GL APIs fail. |
| 24 static CompositingIOSurfaceMac* Create(); | 26 static CompositingIOSurfaceMac* Create(); |
| 25 ~CompositingIOSurfaceMac(); | 27 ~CompositingIOSurfaceMac(); |
| 26 | 28 |
| 27 // Set IOSurface that will be drawn on the next NSView drawRect. | 29 // Set IOSurface that will be drawn on the next NSView drawRect. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // Shader parameters. | 145 // Shader parameters. |
| 144 GLuint shader_program_blit_rgb_; | 146 GLuint shader_program_blit_rgb_; |
| 145 GLint blit_rgb_sampler_location_; | 147 GLint blit_rgb_sampler_location_; |
| 146 GLuint shader_program_white_; | 148 GLuint shader_program_white_; |
| 147 | 149 |
| 148 SurfaceQuad quad_; | 150 SurfaceQuad quad_; |
| 149 | 151 |
| 150 bool is_vsync_disabled_; | 152 bool is_vsync_disabled_; |
| 151 }; | 153 }; |
| 152 | 154 |
| 155 } // namespace content |
| 156 |
| 153 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H | 157 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H |
| OLD | NEW |