Fix for ISpy relocation.
[chromium-blink-merge.git] / cc / test / test_in_process_context_provider.h
blob9dfd7e91845233fae0b712f86f4166b6dcd04267
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
3 // found in the LICENSE file.
5 #ifndef CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
6 #define CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
8 #include "cc/output/context_provider.h"
9 #include "skia/ext/refptr.h"
11 class GrContext;
13 namespace gpu {
14 class GLInProcessContext;
17 namespace cc {
19 scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext();
21 class TestInProcessContextProvider : public ContextProvider {
22 public:
23 TestInProcessContextProvider();
25 virtual bool BindToCurrentThread() OVERRIDE;
26 virtual gpu::gles2::GLES2Interface* ContextGL() OVERRIDE;
27 virtual gpu::ContextSupport* ContextSupport() OVERRIDE;
28 virtual class GrContext* GrContext() OVERRIDE;
29 virtual Capabilities ContextCapabilities() OVERRIDE;
30 virtual bool IsContextLost() OVERRIDE;
31 virtual void VerifyContexts() OVERRIDE;
32 virtual bool DestroyedOnMainThread() OVERRIDE;
33 virtual void SetLostContextCallback(
34 const LostContextCallback& lost_context_callback) OVERRIDE;
35 virtual void SetMemoryPolicyChangedCallback(
36 const MemoryPolicyChangedCallback& memory_policy_changed_callback)
37 OVERRIDE;
39 protected:
40 friend class base::RefCountedThreadSafe<TestInProcessContextProvider>;
41 virtual ~TestInProcessContextProvider();
43 private:
44 scoped_ptr<gpu::GLInProcessContext> context_;
45 skia::RefPtr<class GrContext> gr_context_;
48 } // namespace cc
50 #endif // CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_