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

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: Use the delta between the ContextStates to decide if we should bind a texture or not 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 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..e0f929134422e2adb7ea5f881a9fabb7bddb4dcf 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,7 +141,7 @@ 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;
@@ -228,6 +229,8 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>,
virtual Logger* GetLogger() = 0;
+ virtual const ContextState* GetContextState() = 0;
+
protected:
GLES2Decoder();
@@ -241,4 +244,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