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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.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
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 // This file contains the GLES2Decoder class. 5 // This file contains the GLES2Decoder class.
6 6
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "gpu/command_buffer/common/capabilities.h" 16 #include "gpu/command_buffer/common/capabilities.h"
17 #include "gpu/command_buffer/service/common_decoder.h" 17 #include "gpu/command_buffer/service/common_decoder.h"
18 #include "gpu/command_buffer/service/logger.h" 18 #include "gpu/command_buffer/service/logger.h"
19 #include "ui/gfx/size.h" 19 #include "ui/gfx/size.h"
20 #include "ui/gl/gl_context.h" 20 #include "ui/gl/gl_context.h"
21 21
22 namespace gfx { 22 namespace gfx {
23 class DirtyTextureState;
23 class GLContext; 24 class GLContext;
24 class GLSurface; 25 class GLSurface;
25 } 26 }
26 27
27 namespace gpu { 28 namespace gpu {
28 29
29 class AsyncPixelTransferDelegate; 30 class AsyncPixelTransferDelegate;
30 class AsyncPixelTransferManager; 31 class AsyncPixelTransferManager;
31 class StreamTextureManager; 32 class StreamTextureManager;
32 struct Mailbox; 33 struct Mailbox;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 134
134 // Gets the associated GLContext. 135 // Gets the associated GLContext.
135 virtual gfx::GLContext* GetGLContext() = 0; 136 virtual gfx::GLContext* GetGLContext() = 0;
136 137
137 // Gets the associated ContextGroup 138 // Gets the associated ContextGroup
138 virtual ContextGroup* GetContextGroup() = 0; 139 virtual ContextGroup* GetContextGroup() = 0;
139 140
140 virtual Capabilities GetCapabilities() = 0; 141 virtual Capabilities GetCapabilities() = 0;
141 142
142 // Restores all of the decoder GL state. 143 // Restores all of the decoder GL state.
143 virtual void RestoreState() const = 0; 144 virtual void RestoreState(
145 const gfx::DirtyTextureState* dirty_texture_state) const = 0;
144 146
145 // Restore States. 147 // Restore States.
146 virtual void RestoreActiveTexture() const = 0; 148 virtual void RestoreActiveTexture() const = 0;
147 virtual void RestoreAllTextureUnitBindings() const = 0; 149 virtual void RestoreAllTextureUnitBindings() const = 0;
148 virtual void RestoreAttribute(unsigned index) const = 0; 150 virtual void RestoreAttribute(unsigned index) const = 0;
149 virtual void RestoreBufferBindings() const = 0; 151 virtual void RestoreBufferBindings() const = 0;
150 virtual void RestoreFramebufferBindings() const = 0; 152 virtual void RestoreFramebufferBindings() const = 0;
151 virtual void RestoreGlobalState() const = 0; 153 virtual void RestoreGlobalState() const = 0;
152 virtual void RestoreProgramBindings() const = 0; 154 virtual void RestoreProgramBindings() const = 0;
153 virtual void RestoreRenderbufferBindings() const = 0; 155 virtual void RestoreRenderbufferBindings() const = 0;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 private: 236 private:
235 bool initialized_; 237 bool initialized_;
236 bool debug_; 238 bool debug_;
237 bool log_commands_; 239 bool log_commands_;
238 240
239 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); 241 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder);
240 }; 242 };
241 243
242 } // namespace gles2 244 } // namespace gles2
243 } // namespace gpu 245 } // namespace gpu
246
244 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ 247 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gl_state_restorer_impl.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698