Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(705)

Side by Side Diff: ui/gfx/compositor/compositor_gl.h

Issue 7327001: Share shaders between browser compositors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't create an extra context. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/gfx/compositor/compositor_gl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/compositor/compositor_gl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698