| 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_context_provider.h" | 5 #include "cc/test/test_context_provider.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "gpu/skia_bindings/grcontext_for_gles2_interface.h" | 21 #include "gpu/skia_bindings/grcontext_for_gles2_interface.h" |
| 22 #include "third_party/skia/include/gpu/GrContext.h" | 22 #include "third_party/skia/include/gpu/GrContext.h" |
| 23 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" | 23 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" |
| 24 | 24 |
| 25 namespace cc { | 25 namespace cc { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // Various tests rely on functionality (capabilities) enabled by these extension | 29 // Various tests rely on functionality (capabilities) enabled by these extension |
| 30 // strings. | 30 // strings. |
| 31 const char* const kExtensions[] = {"GL_EXT_stencil_wrap", | 31 const char* const kExtensions[] = { |
| 32 "GL_EXT_texture_format_BGRA8888", | 32 "GL_EXT_stencil_wrap", "GL_EXT_texture_format_BGRA8888", |
| 33 "GL_OES_rgb8_rgba8"}; | 33 "GL_OES_rgb8_rgba8", "GL_EXT_texture_norm16"}; |
| 34 | 34 |
| 35 class TestGLES2InterfaceForContextProvider : public TestGLES2Interface { | 35 class TestGLES2InterfaceForContextProvider : public TestGLES2Interface { |
| 36 public: | 36 public: |
| 37 TestGLES2InterfaceForContextProvider() | 37 TestGLES2InterfaceForContextProvider() |
| 38 : extension_string_(BuildExtensionString()) {} | 38 : extension_string_(BuildExtensionString()) {} |
| 39 ~TestGLES2InterfaceForContextProvider() override = default; | 39 ~TestGLES2InterfaceForContextProvider() override = default; |
| 40 | 40 |
| 41 // TestGLES2Interface: | 41 // TestGLES2Interface: |
| 42 const GLubyte* GetString(GLenum name) override { | 42 const GLubyte* GetString(GLenum name) override { |
| 43 switch (name) { | 43 switch (name) { |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 } | 261 } |
| 262 | 262 |
| 263 void TestContextProvider::SetLostContextCallback( | 263 void TestContextProvider::SetLostContextCallback( |
| 264 const LostContextCallback& cb) { | 264 const LostContextCallback& cb) { |
| 265 DCHECK(context_thread_checker_.CalledOnValidThread()); | 265 DCHECK(context_thread_checker_.CalledOnValidThread()); |
| 266 DCHECK(lost_context_callback_.is_null() || cb.is_null()); | 266 DCHECK(lost_context_callback_.is_null() || cb.is_null()); |
| 267 lost_context_callback_ = cb; | 267 lost_context_callback_ = cb; |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace cc | 270 } // namespace cc |
| OLD | NEW |