| 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_
|
|
|