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 UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ | 5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ |
6 #define UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ | 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual void SchedulePaint() OVERRIDE; | 68 virtual void SchedulePaint() OVERRIDE; |
69 virtual void OnWidgetSizeChanged(const gfx::Size& size) OVERRIDE; | 69 virtual void OnWidgetSizeChanged(const gfx::Size& size) OVERRIDE; |
70 | 70 |
71 // Specific to CompositorGL. | 71 // Specific to CompositorGL. |
72 bool InitShaders(); | 72 bool InitShaders(); |
73 | 73 |
74 // The GL context used for compositing. | 74 // The GL context used for compositing. |
75 scoped_refptr<gfx::GLSurface> gl_surface_; | 75 scoped_refptr<gfx::GLSurface> gl_surface_; |
76 scoped_refptr<gfx::GLContext> gl_context_; | 76 scoped_refptr<gfx::GLContext> gl_context_; |
77 | 77 |
78 // TODO(wjmaclean): Make these static so they ca be shared in a single | 78 static TextureProgramGL* program_swizzle_; |
79 // context. | 79 static TextureProgramGL* program_no_swizzle_; |
80 scoped_ptr<TextureProgramGL> program_swizzle_; | |
81 scoped_ptr<TextureProgramGL> program_no_swizzle_; | |
82 | 80 |
83 gfx::Size size_; | 81 gfx::Size size_; |
84 | 82 |
85 // Keep track of whether compositing has started or not. | 83 // Keep track of whether compositing has started or not. |
86 bool started_; | 84 bool started_; |
87 | 85 |
88 DISALLOW_COPY_AND_ASSIGN(CompositorGL); | 86 DISALLOW_COPY_AND_ASSIGN(CompositorGL); |
89 }; | 87 }; |
90 | 88 |
91 } // namespace ui | 89 } // namespace ui |
92 | 90 |
93 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ | 91 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ |
OLD | NEW |