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

Side by Side Diff: ui/gl/gl_gl_api_implementation.h

Issue 104833007: Restore only modified texture state during virtual context switches (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More cleanup Created 7 years 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
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_gl_api_implementation.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) 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 UI_GL_GL_API_IMPLEMENTATION_H_ 5 #ifndef UI_GL_GL_API_IMPLEMENTATION_H_
6 #define UI_GL_GL_API_IMPLEMENTATION_H_ 6 #define UI_GL_GL_API_IMPLEMENTATION_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ui/gl/dirty_texture_state.h"
9 #include "ui/gl/gl_bindings.h" 10 #include "ui/gl/gl_bindings.h"
10 #include "ui/gl/gl_export.h" 11 #include "ui/gl/gl_export.h"
11 12
12 namespace gpu { 13 namespace gpu {
13 namespace gles2 { 14 namespace gles2 {
14 class GLES2Decoder; 15 class GLES2Decoder;
15 } 16 }
16 } 17 }
17 namespace gfx { 18 namespace gfx {
18 19
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 virtual ~VirtualGLApi(); 74 virtual ~VirtualGLApi();
74 void Initialize(DriverGL* driver, GLContext* real_context); 75 void Initialize(DriverGL* driver, GLContext* real_context);
75 76
76 // Sets the current virutal context. 77 // Sets the current virutal context.
77 bool MakeCurrent(GLContext* virtual_context, GLSurface* surface); 78 bool MakeCurrent(GLContext* virtual_context, GLSurface* surface);
78 79
79 void OnReleaseVirtuallyCurrent(GLContext* virtual_context); 80 void OnReleaseVirtuallyCurrent(GLContext* virtual_context);
80 81
81 // Overridden functions from GLApiBase 82 // Overridden functions from GLApiBase
82 virtual const GLubyte* glGetStringFn(GLenum name) OVERRIDE; 83 virtual const GLubyte* glGetStringFn(GLenum name) OVERRIDE;
84 virtual void glActiveTextureFn(GLenum texture) OVERRIDE;
85 virtual void glBindTextureFn(GLenum target, GLuint texture) OVERRIDE;
83 86
84 private: 87 private:
88 // Clears the dirty texture state associated with this virtual context.
89 void ClearDirtyTextureState();
90
85 // The real context we're running on. 91 // The real context we're running on.
86 GLContext* real_context_; 92 GLContext* real_context_;
87 93
88 // The current virtual context. 94 // The current virtual context.
89 GLContext* current_context_; 95 GLContext* current_context_;
90 96
91 // The supported extensions being advertised for this virtual context. 97 // The supported extensions being advertised for this virtual context.
92 std::string extensions_; 98 std::string extensions_;
99
100 // Current active texture unit.
101 GLenum current_active_texture_unit_;
102
103 // The texture state that has been modified by this virtual context.
104 DirtyTextureState dirty_texture_state_;
93 }; 105 };
94 106
95 } // namespace gfx 107 } // namespace gfx
96 108
97 #endif // UI_GL_GL_API_IMPLEMENTATION_H_ 109 #endif // UI_GL_GL_API_IMPLEMENTATION_H_
OLDNEW
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_gl_api_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698