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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.h

Issue 118203002: During virtual context switches only restore texture units that have changed from the previous cont… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More unittests Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder.h
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h
index 87c93350415a7be4fe565b7c817e0e76baffe4d3..5c36b21bcca53bc9f4ec73d7160e07a026609c72 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.h
@@ -34,6 +34,7 @@ struct Mailbox;
namespace gles2 {
class ContextGroup;
+class ContextState;
class ErrorState;
class GLES2Util;
class Logger;
@@ -140,11 +141,12 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>,
virtual Capabilities GetCapabilities() = 0;
// Restores all of the decoder GL state.
- virtual void RestoreState() const = 0;
+ virtual void RestoreState(const ContextState* prev_state) const = 0;
// Restore States.
virtual void RestoreActiveTexture() const = 0;
- virtual void RestoreAllTextureUnitBindings() const = 0;
+ virtual void RestoreAllTextureUnitBindings(
+ const ContextState* prev_state) const = 0;
virtual void RestoreAttribute(unsigned index) const = 0;
virtual void RestoreBufferBindings() const = 0;
virtual void RestoreFramebufferBindings() const = 0;
@@ -228,6 +230,8 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>,
virtual Logger* GetLogger() = 0;
+ virtual const ContextState* GetContextState() = 0;
+
protected:
GLES2Decoder();
@@ -241,4 +245,5 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>,
} // namespace gles2
} // namespace gpu
+
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_

Powered by Google App Engine
This is Rietveld 408576698