Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: ui/gl/test/gl_surface_test_support.cc

Issue 1354483004: Re-land: ui: Add GLImage unit test framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another build fix Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/gl/gl_image_unittest.cc ('K') | « ui/gl/test/gl_surface_test_support.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/test/gl_surface_test_support.cc
diff --git a/ui/gl/test/gl_surface_test_support.cc b/ui/gl/test/gl_surface_test_support.cc
index ecc8015c5ef3fd320c17e4b591c9f9f2f94d3514..cfd0cdbe8ec36a1c0634c589c251d4ff1121816a 100644
--- a/ui/gl/test/gl_surface_test_support.cc
+++ b/ui/gl/test/gl_surface_test_support.cc
@@ -61,12 +61,13 @@ void GLSurfaceTestSupport::InitializeOneOff() {
}
// static
-void GLSurfaceTestSupport::InitializeOneOffWithMockBindings() {
+void GLSurfaceTestSupport::InitializeOneOffImplementation(
+ GLImplementation impl) {
DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL))
<< "kUseGL has not effect in tests";
// This method may be called multiple times in the same process to set up
- // mock bindings in different ways.
+ // bindings in different ways.
ClearGLBindings();
bool fallback_to_osmesa = false;
@@ -74,8 +75,12 @@ void GLSurfaceTestSupport::InitializeOneOffWithMockBindings() {
bool disable_gl_drawing = false;
CHECK(GLSurface::InitializeOneOffImplementation(
- kGLImplementationMockGL, fallback_to_osmesa, gpu_service_logging,
- disable_gl_drawing));
+ impl, fallback_to_osmesa, gpu_service_logging, disable_gl_drawing));
+}
+
+// static
+void GLSurfaceTestSupport::InitializeOneOffWithMockBindings() {
+ InitializeOneOffImplementation(kGLImplementationMockGL);
}
// static
« ui/gl/gl_image_unittest.cc ('K') | « ui/gl/test/gl_surface_test_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698