| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/gl/test/gl_image_test_support.h" | 5 #include "ui/gl/test/gl_image_test_support.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ui/gl/gl_implementation.h" | 9 #include "ui/gl/gl_implementation.h" |
| 10 #include "ui/gl/init/gl_factory.h" | 10 #include "ui/gl/init/gl_factory.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 GLSurfaceTestSupport::InitializeOneOffImplementation(impl, true); | 26 GLSurfaceTestSupport::InitializeOneOffImplementation(impl, true); |
| 27 #if defined(USE_OZONE) | 27 #if defined(USE_OZONE) |
| 28 // Make sure all the tasks posted to the current task runner by the | 28 // Make sure all the tasks posted to the current task runner by the |
| 29 // initialization functions are run before running the tests. | 29 // initialization functions are run before running the tests. |
| 30 base::RunLoop().RunUntilIdle(); | 30 base::RunLoop().RunUntilIdle(); |
| 31 #endif | 31 #endif |
| 32 } | 32 } |
| 33 | 33 |
| 34 // static | 34 // static |
| 35 void GLImageTestSupport::CleanupGL() { | 35 void GLImageTestSupport::CleanupGL() { |
| 36 init::ClearGLBindings(); | 36 init::ShutdownGL(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 // static | 39 // static |
| 40 void GLImageTestSupport::SetBufferDataToColor(int width, | 40 void GLImageTestSupport::SetBufferDataToColor(int width, |
| 41 int height, | 41 int height, |
| 42 int stride, | 42 int stride, |
| 43 int plane, | 43 int plane, |
| 44 gfx::BufferFormat format, | 44 gfx::BufferFormat format, |
| 45 const uint8_t color[4], | 45 const uint8_t color[4], |
| 46 uint8_t* data) { | 46 uint8_t* data) { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 case gfx::BufferFormat::ETC1: | 166 case gfx::BufferFormat::ETC1: |
| 167 case gfx::BufferFormat::RGBA_4444: | 167 case gfx::BufferFormat::RGBA_4444: |
| 168 case gfx::BufferFormat::UYVY_422: | 168 case gfx::BufferFormat::UYVY_422: |
| 169 NOTREACHED(); | 169 NOTREACHED(); |
| 170 return; | 170 return; |
| 171 } | 171 } |
| 172 NOTREACHED(); | 172 NOTREACHED(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 } // namespace gl | 175 } // namespace gl |
| OLD | NEW |