OLD | NEW |
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 #include "cc/test/test_in_process_context_provider.h" | 5 #include "cc/test/test_in_process_context_provider.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "gpu/GLES2/gl2extchromium.h" | 8 #include "gpu/GLES2/gl2extchromium.h" |
9 #include "gpu/command_buffer/client/gl_in_process_context.h" | 9 #include "gpu/command_buffer/client/gl_in_process_context.h" |
10 #include "gpu/command_buffer/client/gles2_implementation.h" | 10 #include "gpu/command_buffer/client/gles2_implementation.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 TestInProcessContextProvider::TestInProcessContextProvider() | 48 TestInProcessContextProvider::TestInProcessContextProvider() |
49 : context_(CreateTestInProcessContext()) {} | 49 : context_(CreateTestInProcessContext()) {} |
50 | 50 |
51 TestInProcessContextProvider::~TestInProcessContextProvider() { | 51 TestInProcessContextProvider::~TestInProcessContextProvider() { |
52 if (gr_context_) | 52 if (gr_context_) |
53 gr_context_->contextDestroyed(); | 53 gr_context_->contextDestroyed(); |
54 } | 54 } |
55 | 55 |
56 bool TestInProcessContextProvider::BindToCurrentThread() { return true; } | 56 bool TestInProcessContextProvider::BindToCurrentThread() { return true; } |
57 | 57 |
58 blink::WebGraphicsContext3D* TestInProcessContextProvider::Context3d() { | |
59 return NULL; | |
60 } | |
61 | |
62 gpu::gles2::GLES2Interface* TestInProcessContextProvider::ContextGL() { | 58 gpu::gles2::GLES2Interface* TestInProcessContextProvider::ContextGL() { |
63 return context_->GetImplementation(); | 59 return context_->GetImplementation(); |
64 } | 60 } |
65 | 61 |
66 gpu::ContextSupport* TestInProcessContextProvider::ContextSupport() { | 62 gpu::ContextSupport* TestInProcessContextProvider::ContextSupport() { |
67 return context_->GetImplementation(); | 63 return context_->GetImplementation(); |
68 } | 64 } |
69 | 65 |
70 static void BindGrContextCallback(const GrGLInterface* interface) { | 66 static void BindGrContextCallback(const GrGLInterface* interface) { |
71 #if GR_GL_PER_GL_FUNC_CALLBACK | 67 #if GR_GL_PER_GL_FUNC_CALLBACK |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 123 |
128 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } | 124 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } |
129 | 125 |
130 void TestInProcessContextProvider::SetLostContextCallback( | 126 void TestInProcessContextProvider::SetLostContextCallback( |
131 const LostContextCallback& lost_context_callback) {} | 127 const LostContextCallback& lost_context_callback) {} |
132 | 128 |
133 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( | 129 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( |
134 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} | 130 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} |
135 | 131 |
136 } // namespace cc | 132 } // namespace cc |
OLD | NEW |