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

Unified Diff: content/common/gpu/client/context_provider_command_buffer.h

Issue 20185002: ContextProvider in OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: contextprovider: don't access Context3d() in OutputSurface contructors, it's not bound yet Created 7 years, 4 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: content/common/gpu/client/context_provider_command_buffer.h
diff --git a/content/common/gpu/client/context_provider_command_buffer.h b/content/common/gpu/client/context_provider_command_buffer.h
index dd21499ea2711fc9d9d191f9e9118cbcf4b6c790..1b0e92eb9bee577188e465a1a8e0ccab18d6ce57 100644
--- a/content/common/gpu/client/context_provider_command_buffer.h
+++ b/content/common/gpu/client/context_provider_command_buffer.h
@@ -35,6 +35,12 @@ class ContextProviderCommandBuffer : public cc::ContextProvider {
virtual bool DestroyedOnMainThread() OVERRIDE;
virtual void SetLostContextCallback(
const LostContextCallback& lost_context_callback) OVERRIDE;
+ virtual void SetSwapBuffersCompleteCallback(
+ const SwapBuffersCompleteCallback& swap_buffers_complete_callback)
+ OVERRIDE;
+ virtual void SetMemoryPolicyChangedCallback(
+ const MemoryPolicyChangedCallback& memory_policy_changed_callback)
+ OVERRIDE;
void set_leak_on_destroy() {
base::AutoLock lock(main_thread_lock_);
@@ -50,7 +56,9 @@ class ContextProviderCommandBuffer : public cc::ContextProvider {
bool InitializeOnMainThread(const CreateCallback& create_callback);
void OnLostContext();
- void OnMemoryAllocationChanged(bool nonzero_allocation);
+ void OnSwapBuffersComplete();
+ void OnMemoryAllocationChanged(
+ const WebKit::WebGraphicsMemoryAllocation& allocation);
private:
base::ThreadChecker main_thread_checker_;
@@ -60,6 +68,8 @@ class ContextProviderCommandBuffer : public cc::ContextProvider {
scoped_ptr<webkit::gpu::GrContextForWebGraphicsContext3D> gr_context_;
LostContextCallback lost_context_callback_;
+ SwapBuffersCompleteCallback swap_buffers_complete_callback_;
+ MemoryPolicyChangedCallback memory_policy_changed_callback_;
base::Lock main_thread_lock_;
bool leak_on_destroy_;
@@ -68,6 +78,10 @@ class ContextProviderCommandBuffer : public cc::ContextProvider {
class LostContextCallbackProxy;
scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_;
+ class SwapBuffersCompleteCallbackProxy;
+ scoped_ptr<SwapBuffersCompleteCallbackProxy>
+ swap_buffers_complete_callback_proxy_;
+
class MemoryAllocationCallbackProxy;
scoped_ptr<MemoryAllocationCallbackProxy> memory_allocation_callback_proxy_;
};
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/common/gpu/client/context_provider_command_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698