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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 interface->fCallbackData = reinterpret_cast<GrGLInterfaceCallbackData>(this); | 119 interface->fCallbackData = reinterpret_cast<GrGLInterfaceCallbackData>(this); |
120 | 120 |
121 gr_context_ = skia::AdoptRef(GrContext::Create( | 121 gr_context_ = skia::AdoptRef(GrContext::Create( |
122 kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(interface.get()))); | 122 kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(interface.get()))); |
123 | 123 |
124 return gr_context_.get(); | 124 return gr_context_.get(); |
125 } | 125 } |
126 | 126 |
127 ContextProvider::Capabilities | 127 ContextProvider::Capabilities |
128 TestInProcessContextProvider::ContextCapabilities() { | 128 TestInProcessContextProvider::ContextCapabilities() { |
129 return ContextProvider::Capabilities(); | 129 ContextProvider::Capabilities capabilities; |
130 capabilities.gpu.image = true; | |
enne (OOO)
2014/10/29 21:30:08
reveman: This is one of the parts that was missing
reveman
2014/10/29 22:22:19
Acknowledged.
| |
131 capabilities.gpu.texture_rectangle = true; | |
132 | |
133 return capabilities; | |
130 } | 134 } |
131 | 135 |
132 bool TestInProcessContextProvider::IsContextLost() { return false; } | 136 bool TestInProcessContextProvider::IsContextLost() { return false; } |
133 | 137 |
134 void TestInProcessContextProvider::VerifyContexts() {} | 138 void TestInProcessContextProvider::VerifyContexts() {} |
135 | 139 |
136 void TestInProcessContextProvider::DeleteCachedResources() { | 140 void TestInProcessContextProvider::DeleteCachedResources() { |
137 if (gr_context_) | 141 if (gr_context_) |
138 gr_context_->freeGpuResources(); | 142 gr_context_->freeGpuResources(); |
139 } | 143 } |
140 | 144 |
141 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } | 145 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } |
142 | 146 |
143 void TestInProcessContextProvider::SetLostContextCallback( | 147 void TestInProcessContextProvider::SetLostContextCallback( |
144 const LostContextCallback& lost_context_callback) {} | 148 const LostContextCallback& lost_context_callback) {} |
145 | 149 |
146 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( | 150 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( |
147 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} | 151 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} |
148 | 152 |
149 } // namespace cc | 153 } // namespace cc |
OLD | NEW |