Index: cc/output/context_provider.h |
diff --git a/cc/output/context_provider.h b/cc/output/context_provider.h |
index 13b7df5948bc5995a50e33dcceaec7e59c6588db..7d61763d108899def1d1293992f9b7a993e80ff2 100644 |
--- a/cc/output/context_provider.h |
+++ b/cc/output/context_provider.h |
@@ -12,6 +12,7 @@ class GrContext; |
namespace WebKit { class WebGraphicsContext3D; } |
namespace cc { |
+struct ManagedMemoryPolicy; |
class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> { |
public: |
@@ -41,6 +42,20 @@ class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> { |
virtual void SetLostContextCallback( |
const LostContextCallback& lost_context_callback) = 0; |
+ // Sets a callback to be called when the context is lost. This should be |
+ // called from the same thread that the context is bound to. |
+ typedef base::Closure SwapBuffersCompleteCallback; |
+ virtual void SetSwapBuffersCompleteCallback( |
+ const SwapBuffersCompleteCallback& swap_buffers_complete_callback) = 0; |
+ |
+ // Sets a callback to be called when the memory policy changes. This should be |
+ // called from the same thread that the context is bound to. |
+ typedef base::Callback<void( |
+ const cc::ManagedMemoryPolicy& policy, |
+ bool discard_backbuffer_when_not_visible)> MemoryPolicyChangedCallback; |
+ virtual void SetMemoryPolicyChangedCallback( |
+ const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0; |
+ |
protected: |
friend class base::RefCountedThreadSafe<ContextProvider>; |
virtual ~ContextProvider() {} |