| Index: android_webview/browser/aw_render_thread_context_provider.h
|
| diff --git a/ui/compositor/test/in_process_context_provider.h b/android_webview/browser/aw_render_thread_context_provider.h
|
| similarity index 49%
|
| copy from ui/compositor/test/in_process_context_provider.h
|
| copy to android_webview/browser/aw_render_thread_context_provider.h
|
| index b3c9da091e18886d369dd6cb99b8d1d690d1a736..bb94e6550ea77e428440bce9e8bfc5ad0ccaa4b5 100644
|
| --- a/ui/compositor/test/in_process_context_provider.h
|
| +++ b/android_webview/browser/aw_render_thread_context_provider.h
|
| @@ -1,46 +1,39 @@
|
| -// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
|
| -#define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
|
| -
|
| -#include <string>
|
| +#ifndef ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_
|
| +#define ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_
|
|
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/synchronization/lock.h"
|
| #include "base/threading/thread_checker.h"
|
| #include "cc/output/context_provider.h"
|
| -#include "gpu/command_buffer/common/gles2_cmd_utils.h"
|
| +#include "gpu/command_buffer/service/in_process_command_buffer.h"
|
| #include "skia/ext/refptr.h"
|
| -#include "ui/gfx/native_widget_types.h"
|
| +
|
| +namespace gfx {
|
| +class GLSurface;
|
| +}
|
|
|
| namespace gpu {
|
| class GLInProcessContext;
|
| }
|
|
|
| -namespace ui {
|
| +namespace android_webview {
|
|
|
| -class InProcessContextProvider : public cc::ContextProvider {
|
| +class AwRenderThreadContextProvider : public cc::ContextProvider {
|
| public:
|
| - 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<InProcessContextProvider> CreateOffscreen(
|
| - bool lose_context_when_out_of_memory);
|
| + static scoped_refptr<AwRenderThreadContextProvider> Create(
|
| + scoped_refptr<gfx::GLSurface> surface,
|
| + scoped_refptr<gpu::InProcessCommandBuffer::Service> service);
|
|
|
| private:
|
| - InProcessContextProvider(
|
| - const gpu::gles2::ContextCreationAttribHelper& attribs,
|
| - bool lose_context_when_out_of_memory,
|
| - gfx::AcceleratedWidget window,
|
| - const std::string& debug_name);
|
| - ~InProcessContextProvider() override;
|
| + AwRenderThreadContextProvider(
|
| + scoped_refptr<gfx::GLSurface> surface,
|
| + scoped_refptr<gpu::InProcessCommandBuffer::Service> service);
|
| + ~AwRenderThreadContextProvider() override;
|
|
|
| // cc::ContextProvider:
|
| bool BindToCurrentThread() override;
|
| @@ -63,27 +56,21 @@ class InProcessContextProvider : public cc::ContextProvider {
|
| void OnLostContext();
|
|
|
| base::ThreadChecker main_thread_checker_;
|
| - base::ThreadChecker context_thread_checker_;
|
|
|
| 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_;
|
|
|
| base::Lock context_lock_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(InProcessContextProvider);
|
| + DISALLOW_COPY_AND_ASSIGN(AwRenderThreadContextProvider);
|
| };
|
|
|
| -} // namespace ui
|
| +} // namespace android_webview
|
|
|
| -#endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
|
| +#endif // ANDROID_WEBVIEW_BROWSER_AW_RENDER_THREAD_CONTEXT_PROVIDER_H_
|
|
|