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

Unified Diff: webkit/gpu/test_context_provider_factory.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
« no previous file with comments | « webkit/gpu/grcontext_for_webgraphicscontext3d.h ('k') | webkit/gpu/test_context_provider_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/gpu/test_context_provider_factory.h
diff --git a/webkit/gpu/test_context_provider_factory.h b/webkit/gpu/test_context_provider_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..db1258dd8b52c710c519aadac31899f708e2aad0
--- /dev/null
+++ b/webkit/gpu/test_context_provider_factory.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2013 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 WEBKIT_GPU_TEST_CONTEXT_PROVIDER_FACTORY_H_
+#define WEBKIT_GPU_TEST_CONTEXT_PROVIDER_FACTORY_H_
+
+#include "base/memory/ref_counted.h"
+#include "webkit/gpu/webkit_gpu_export.h"
+#include "webkit/support/webkit_support.h"
+
+namespace cc {
+class ContextProvider;
+}
+
+namespace webkit {
+namespace gpu {
+class ContextProviderInProcess;
+
+class WEBKIT_GPU_EXPORT TestContextProviderFactory {
+ public:
+ static void SetUpFactoryForTesting(
+ webkit_support::GraphicsContext3DImplementation implementation);
+
+ // SetUpFactoryForTesting() must be called before GetInstance can be called.
+ // The returned pointer is static and should not be deleted by the caller.
+ static TestContextProviderFactory* GetInstance();
+
+ scoped_refptr<cc::ContextProvider> OffscreenContextProviderForMainThread();
+ scoped_refptr<cc::ContextProvider>
+ OffscreenContextProviderForCompositorThread();
+
+ private:
+ TestContextProviderFactory();
+ ~TestContextProviderFactory();
+
+ scoped_refptr<webkit::gpu::ContextProviderInProcess> main_thread_;
+ scoped_refptr<webkit::gpu::ContextProviderInProcess> compositor_thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestContextProviderFactory);
+};
+
+} // namespace gpu
+} // namespace webkit
+
+#endif // WEBKIT_GPU_TEST_WEBKIT_CONTEXT_PROVIDER_FACTORY_H_
« no previous file with comments | « webkit/gpu/grcontext_for_webgraphicscontext3d.h ('k') | webkit/gpu/test_context_provider_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698