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

Unified Diff: webkit/gpu/context_provider_in_process.h

Issue 12217099: Implement the Platform::sharedOffscreenGraphicsContext3D method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no factory member vars Created 7 years, 10 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: webkit/gpu/context_provider_in_process.h
diff --git a/content/common/gpu/client/context_provider_command_buffer.h b/webkit/gpu/context_provider_in_process.h
similarity index 53%
copy from content/common/gpu/client/context_provider_command_buffer.h
copy to webkit/gpu/context_provider_in_process.h
index c415e0ff2de577df30d2a0a53a80455b0f31ba41..50d06ed9791af656e7355da8f3c28f9715cca1b7 100644
--- a/content/common/gpu/client/context_provider_command_buffer.h
+++ b/webkit/gpu/context_provider_in_process.h
@@ -2,49 +2,44 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER
-#define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER
+#ifndef WEBKIT_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_
+#define WEBKIT_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "cc/context_provider.h"
-#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
namespace webkit {
namespace gpu {
class GrContextForWebGraphicsContext3D;
-}
-}
-namespace content {
-
-// Implementation of cc::ContextProvider that provides a
-// WebGraphicsContext3DCommandBufferImpl context and a GrContext.
-class ContextProviderCommandBuffer : public cc::ContextProvider {
+class ContextProviderInProcess : public cc::ContextProvider {
public:
- ContextProviderCommandBuffer();
+ enum InProcessType {
+ IN_PROCESS,
+ IN_PROCESS_COMMAND_BUFFER,
+ };
+ explicit ContextProviderInProcess(InProcessType type);
virtual bool InitializeOnMainThread() OVERRIDE;
virtual bool BindToCurrentThread() OVERRIDE;
- virtual WebGraphicsContext3DCommandBufferImpl* Context3d() OVERRIDE;
+ virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE;
virtual class GrContext* GrContext() OVERRIDE;
virtual void VerifyContexts() OVERRIDE;
bool DestroyedOnMainThread();
protected:
- virtual ~ContextProviderCommandBuffer();
+ virtual ~ContextProviderInProcess();
- // Subclass must provide an implementation to create an offscreen context.
- virtual scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
- CreateOffscreenContext3d() = 0;
+ scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext3d();
virtual void OnLostContext();
virtual void OnMemoryAllocationChanged(bool nonzero_allocation);
private:
-
- scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context3d_;
+ InProcessType type_;
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
scoped_ptr<webkit::gpu::GrContextForWebGraphicsContext3D> gr_context_;
base::Lock destroyed_lock_;
@@ -57,6 +52,7 @@ class ContextProviderCommandBuffer : public cc::ContextProvider {
scoped_ptr<MemoryAllocationCallbackProxy> memory_allocation_callback_proxy_;
};
-} // namespace content
+} // namespace gpu
+} // namespace webkit
-#endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER
+#endif // WEBKIT_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_
« no previous file with comments | « webkit/compositor_bindings/web_layer_tree_view_impl_for_testing.cc ('k') | webkit/gpu/context_provider_in_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698