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

Side by Side 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: Drop was_created Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_GPU_TEST_CONTEXT_PROVIDER_FACTORY_H_
6 #define WEBKIT_GPU_TEST_CONTEXT_PROVIDER_FACTORY_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "webkit/gpu/webkit_gpu_export.h"
10 #include "webkit/support/webkit_support.h"
11
12 namespace cc {
13 class ContextProvider;
14 }
15
16 namespace webkit {
17 namespace gpu {
18 class ContextProviderInProcess;
19
20 class WEBKIT_GPU_EXPORT TestContextProviderFactory {
21 public:
22 static void SetUpFactoryForTesting(
23 webkit_support::GraphicsContext3DImplementation implementation);
24
25 // Each call to GetInstance should be matched with a call to DestroyInstance.
26 // SetUpFactoryForTesting() must be called before GetInstance can be called.
27 // The returned pointer is static and should not be deleted by the caller.
28 static TestContextProviderFactory* GetInstance();
29 static void DestroyInstance();
30
31 scoped_refptr<cc::ContextProvider> OffscreenContextProviderForMainThread();
32 scoped_refptr<cc::ContextProvider>
33 OffscreenContextProviderForCompositorThread();
34
35 private:
36 TestContextProviderFactory();
37 ~TestContextProviderFactory();
38
39 scoped_refptr<webkit::gpu::ContextProviderInProcess> main_thread_;
40 scoped_refptr<webkit::gpu::ContextProviderInProcess> compositor_thread_;
41
42 DISALLOW_COPY_AND_ASSIGN(TestContextProviderFactory);
43 };
44
45 } // namespace gpu
46 } // namespace webkit
47
48 #endif // WEBKIT_GPU_TEST_WEBKIT_CONTEXT_PROVIDER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698