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

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: Change mock GetContextState to return const ContextState* instead of non-const 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..cd876580c2f92e357a7ee992db67ff498ad0a13e 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.h
@@ -39,6 +39,7 @@ class GLES2Util;
class Logger;
class QueryManager;
class VertexArrayManager;
+struct ContextState;
struct DisallowedFeatures {
DisallowedFeatures()
@@ -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_
« 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