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 17 matching lines...) Expand all Loading... |
28 // GLContext sharing so that we only have to create/destroy them once. | 28 // GLContext sharing so that we only have to create/destroy them once. |
29 class COMPOSITOR_EXPORT SharedResources { | 29 class COMPOSITOR_EXPORT SharedResources { |
30 public: | 30 public: |
31 static SharedResources* GetInstance(); | 31 static SharedResources* GetInstance(); |
32 | 32 |
33 bool MakeSharedContextCurrent(); | 33 bool MakeSharedContextCurrent(); |
34 | 34 |
35 // Creates a context that shares the resources hosted by this singleton. | 35 // Creates a context that shares the resources hosted by this singleton. |
36 scoped_refptr<gfx::GLContext> CreateContext(gfx::GLSurface* surface); | 36 scoped_refptr<gfx::GLContext> CreateContext(gfx::GLSurface* surface); |
37 | 37 |
| 38 void* GetDisplay(); |
| 39 |
38 ui::TextureProgramGL* program_no_swizzle() { | 40 ui::TextureProgramGL* program_no_swizzle() { |
39 return program_no_swizzle_.get(); | 41 return program_no_swizzle_.get(); |
40 } | 42 } |
41 | 43 |
42 ui::TextureProgramGL* program_swizzle() { | 44 ui::TextureProgramGL* program_swizzle() { |
43 return program_swizzle_.get(); | 45 return program_swizzle_.get(); |
44 } | 46 } |
45 | 47 |
46 private: | 48 private: |
47 friend struct DefaultSingletonTraits<SharedResources>; | 49 friend struct DefaultSingletonTraits<SharedResources>; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 119 |
118 // Keep track of whether compositing has started or not. | 120 // Keep track of whether compositing has started or not. |
119 bool started_; | 121 bool started_; |
120 | 122 |
121 DISALLOW_COPY_AND_ASSIGN(CompositorGL); | 123 DISALLOW_COPY_AND_ASSIGN(CompositorGL); |
122 }; | 124 }; |
123 | 125 |
124 } // namespace ui | 126 } // namespace ui |
125 | 127 |
126 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ | 128 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_GL_H_ |
OLD | NEW |