| Index: ui/compositor/test/in_process_context_provider.h
|
| diff --git a/webkit/common/gpu/context_provider_in_process.h b/ui/compositor/test/in_process_context_provider.h
|
| similarity index 53%
|
| copy from webkit/common/gpu/context_provider_in_process.h
|
| copy to ui/compositor/test/in_process_context_provider.h
|
| index e3c9ea1e34b79770b0e146b9480466bfab811c41..4b63ed4cf0f22839ddf7f106ea22fbbc4b3a7eec 100644
|
| --- a/webkit/common/gpu/context_provider_in_process.h
|
| +++ b/ui/compositor/test/in_process_context_provider.h
|
| @@ -11,46 +11,42 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/synchronization/lock.h"
|
| #include "base/threading/thread_checker.h"
|
| -#include "webkit/common/gpu/context_provider_web_context.h"
|
| -#include "webkit/common/gpu/webkit_gpu_export.h"
|
| +#include "cc/output/context_provider.h"
|
| +#include "gpu/command_buffer/common/gles2_cmd_utils.h"
|
| +#include "skia/ext/refptr.h"
|
| +#include "ui/gfx/native_widget_types.h"
|
|
|
| -namespace blink { class WebGraphicsContext3D; }
|
| -
|
| -namespace gpu_blink {
|
| -class WebGraphicsContext3DInProcessCommandBufferImpl;
|
| +namespace gpu {
|
| +class GLInProcessContext;
|
| }
|
|
|
| -namespace webkit {
|
| -namespace gpu {
|
| -class GrContextForWebGraphicsContext3D;
|
| +namespace ui {
|
|
|
| -class WEBKIT_GPU_EXPORT ContextProviderInProcess
|
| - : NON_EXPORTED_BASE(public ContextProviderWebContext) {
|
| +class InProcessContextProvider : public cc::ContextProvider {
|
| public:
|
| - static scoped_refptr<ContextProviderInProcess> Create(
|
| - scoped_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl>
|
| - context3d,
|
| + static scoped_refptr<InProcessContextProvider> Create(
|
| + const gpu::gles2::ContextCreationAttribHelper& attribs,
|
| + bool lose_context_when_out_of_memory,
|
| + gfx::AcceleratedWidget window,
|
| const std::string& debug_name);
|
|
|
| // Uses default attributes for creating an offscreen context.
|
| - static scoped_refptr<ContextProviderInProcess> CreateOffscreen(
|
| + static scoped_refptr<InProcessContextProvider> CreateOffscreen(
|
| bool lose_context_when_out_of_memory);
|
|
|
| private:
|
| - ContextProviderInProcess(
|
| - scoped_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl>
|
| - context3d,
|
| + InProcessContextProvider(
|
| + const gpu::gles2::ContextCreationAttribHelper& attribs,
|
| + bool lose_context_when_out_of_memory,
|
| + gfx::AcceleratedWidget window,
|
| const std::string& debug_name);
|
| - ~ContextProviderInProcess() override;
|
| -
|
| - // ContextProviderWebContext:
|
| - blink::WebGraphicsContext3D* WebContext3D() override;
|
| + ~InProcessContextProvider() override;
|
|
|
| // cc::ContextProvider:
|
| bool BindToCurrentThread() override;
|
| Capabilities ContextCapabilities() override;
|
| - ::gpu::gles2::GLES2Interface* ContextGL() override;
|
| - ::gpu::ContextSupport* ContextSupport() override;
|
| + gpu::gles2::GLES2Interface* ContextGL() override;
|
| + gpu::ContextSupport* ContextSupport() override;
|
| class GrContext* GrContext() override;
|
| bool IsContextLost() override;
|
| void VerifyContexts() override;
|
| @@ -63,30 +59,27 @@ class WEBKIT_GPU_EXPORT ContextProviderInProcess
|
| override;
|
|
|
| void OnLostContext();
|
| - void InitializeCapabilities();
|
|
|
| base::ThreadChecker main_thread_checker_;
|
| base::ThreadChecker context_thread_checker_;
|
|
|
| - scoped_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl>
|
| - context3d_;
|
| - scoped_ptr<GrContextForWebGraphicsContext3D> gr_context_;
|
| + scoped_ptr<gpu::GLInProcessContext> context_;
|
| + skia::RefPtr<class GrContext> gr_context_;
|
| +
|
| + gpu::gles2::ContextCreationAttribHelper attribs_;
|
| + bool lose_context_when_out_of_memory_;
|
| + gfx::AcceleratedWidget window_;
|
| + std::string debug_name_;
|
| + cc::ContextProvider::Capabilities capabilities_;
|
|
|
| LostContextCallback lost_context_callback_;
|
|
|
| base::Lock destroyed_lock_;
|
| bool destroyed_;
|
|
|
| - std::string debug_name_;
|
| - class LostContextCallbackProxy;
|
| - scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_;
|
| -
|
| - cc::ContextProvider::Capabilities capabilities_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(ContextProviderInProcess);
|
| + DISALLOW_COPY_AND_ASSIGN(InProcessContextProvider);
|
| };
|
|
|
| -} // namespace gpu
|
| -} // namespace webkit
|
| +} // namespace ui
|
|
|
| #endif // WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_
|
|
|