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

Side by Side Diff: cc/test/test_context_provider.h

Issue 92593004: Use GLES2Interface for shader programs Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « cc/output/shader_unittest.cc ('k') | cc/test/test_context_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_TEST_CONTEXT_PROVIDER_H_ 5 #ifndef CC_TEST_TEST_CONTEXT_PROVIDER_H_
6 #define CC_TEST_TEST_CONTEXT_PROVIDER_H_ 6 #define CC_TEST_TEST_CONTEXT_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
11 #include "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
12 #include "cc/output/context_provider.h" 12 #include "cc/output/context_provider.h"
13 #include "cc/test/test_context_support.h" 13 #include "cc/test/test_context_support.h"
14 #include "gpu/command_buffer/client/gles2_interface_stub.h"
15 14
16 namespace blink { class WebGraphicsContext3D; } 15 namespace blink { class WebGraphicsContext3D; }
17 16
18 namespace cc { 17 namespace cc {
18 class TestGLES2Interface;
19 class TestWebGraphicsContext3D; 19 class TestWebGraphicsContext3D;
20 20
21 class TestContextProvider : public cc::ContextProvider { 21 class TestContextProvider : public cc::ContextProvider {
22 public: 22 public:
23 typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)> 23 typedef base::Callback<scoped_ptr<TestWebGraphicsContext3D>(void)>
24 CreateCallback; 24 CreateCallback;
25 25
26 static scoped_refptr<TestContextProvider> Create(); 26 static scoped_refptr<TestContextProvider> Create();
27 static scoped_refptr<TestContextProvider> Create( 27 static scoped_refptr<TestContextProvider> Create(
28 scoped_ptr<TestWebGraphicsContext3D> context); 28 scoped_ptr<TestWebGraphicsContext3D> context);
(...skipping 28 matching lines...) Expand all
57 protected: 57 protected:
58 explicit TestContextProvider(scoped_ptr<TestWebGraphicsContext3D> context); 58 explicit TestContextProvider(scoped_ptr<TestWebGraphicsContext3D> context);
59 virtual ~TestContextProvider(); 59 virtual ~TestContextProvider();
60 60
61 void OnLostContext(); 61 void OnLostContext();
62 void OnSwapBuffersComplete(); 62 void OnSwapBuffersComplete();
63 63
64 TestContextSupport support_; 64 TestContextSupport support_;
65 65
66 scoped_ptr<TestWebGraphicsContext3D> context3d_; 66 scoped_ptr<TestWebGraphicsContext3D> context3d_;
67 gpu::gles2::GLES2InterfaceStub context_gl_stub_; 67 scoped_ptr<TestGLES2Interface> context_gl_stub_;
68 bool bound_; 68 bool bound_;
69 69
70 base::ThreadChecker main_thread_checker_; 70 base::ThreadChecker main_thread_checker_;
71 base::ThreadChecker context_thread_checker_; 71 base::ThreadChecker context_thread_checker_;
72 72
73 base::Lock destroyed_lock_; 73 base::Lock destroyed_lock_;
74 bool destroyed_; 74 bool destroyed_;
75 75
76 LostContextCallback lost_context_callback_; 76 LostContextCallback lost_context_callback_;
77 SwapBuffersCompleteCallback swap_buffers_complete_callback_; 77 SwapBuffersCompleteCallback swap_buffers_complete_callback_;
78 MemoryPolicyChangedCallback memory_policy_changed_callback_; 78 MemoryPolicyChangedCallback memory_policy_changed_callback_;
79 79
80 class LostContextCallbackProxy; 80 class LostContextCallbackProxy;
81 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_; 81 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_;
82 82
83 class SwapBuffersCompleteCallbackProxy; 83 class SwapBuffersCompleteCallbackProxy;
84 scoped_ptr<SwapBuffersCompleteCallbackProxy> 84 scoped_ptr<SwapBuffersCompleteCallbackProxy>
85 swap_buffers_complete_callback_proxy_; 85 swap_buffers_complete_callback_proxy_;
86 }; 86 };
87 87
88 } // namespace cc 88 } // namespace cc
89 89
90 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_ 90 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_
91 91
OLDNEW
« no previous file with comments | « cc/output/shader_unittest.cc ('k') | cc/test/test_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698