Index: ui/gl/gl_context.h |
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h |
index 2b4ec0e660920e68bead1121508f5ad90b57731b..5e48d2a3a217daa197acfa632a552bda17da33b7 100644 |
--- a/ui/gl/gl_context.h |
+++ b/ui/gl/gl_context.h |
@@ -15,6 +15,7 @@ |
#include "base/synchronization/cancellation_flag.h" |
#include "ui/gl/gl_share_group.h" |
#include "ui/gl/gl_state_restorer.h" |
+#include "ui/gl/gl_surface.h" |
#include "ui/gl/gpu_preference.h" |
namespace gpu { |
@@ -74,18 +75,21 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> { |
// Returns space separated list of extensions. The context must be current. |
virtual std::string GetExtensions(); |
- // Indicate that it is safe to force this context to switch GPUs, since |
+ // Indicates that it is safe to force this context to switch GPUs, since |
// transitioning can cause corruption and hangs (OS X only). |
virtual void SetSafeToForceGpuSwitch(); |
- // Attempt to force the context to move to the GPU of its sharegroup. Return |
+ // Attempts to force the context to move to the GPU of its sharegroup. Return |
// false only in the event of an unexpected error on the context. |
virtual bool ForceGpuSwitchIfNeeded(); |
- // Indicate that the real context switches should unbind the FBO first |
+ // Indicates that the real context switches should unbind the FBO first |
// (For an Android work-around only). |
virtual void SetUnbindFboOnMakeCurrent(); |
+ // Updates the shared context to a matched configuration. |
+ virtual void UpdateSharedContext(GLContext* context); |
+ |
// Returns whether the current context supports the named extension. The |
// context must be current. |
bool HasExtension(const char* name); |
@@ -135,6 +139,8 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> { |
// Restore the context's state if it was dirtied by an external caller. |
virtual void RestoreStateIfDirtiedExternally(); |
+ GLSurface::Format GetFormat() { return format_; } |
+ |
protected: |
virtual ~GLContext(); |
@@ -167,7 +173,9 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> { |
bool GetStateWasDirtiedExternally() const; |
void SetStateWasDirtiedExternally(bool dirtied_externally); |
- private: |
+ GLSurface::Format format_; |
+ |
+private: |
friend class base::RefCounted<GLContext>; |
// For GetRealCurrent. |