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

Unified Diff: android_webview/browser/aw_render_thread_context_provider.h

Issue 1083843002: android_webview: Remove dependency on webkit's ContextProviderInProcess. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for real Created 5 years, 8 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
« no previous file with comments | « android_webview/browser/DEPS ('k') | android_webview/browser/aw_render_thread_context_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « android_webview/browser/DEPS ('k') | android_webview/browser/aw_render_thread_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698