diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-03 19:53:15 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-03 19:53:15 +0000 |
commit | af7c5d96e7a34531cc8c9cbbe207013624c4c534 (patch) | |
tree | af753fc432af2a5aba96cfc9529accec0b062076 /cc/test/pixel_test.cc | |
parent | 4e8809e57328d02157e06981a340a66e6a4a1390 (diff) | |
download | chromium_src-af7c5d96e7a34531cc8c9cbbe207013624c4c534.zip chromium_src-af7c5d96e7a34531cc8c9cbbe207013624c4c534.tar.gz chromium_src-af7c5d96e7a34531cc8c9cbbe207013624c4c534.tar.bz2 |
Ensure GL initialization only happens once, and provide common init path
Currently tests initialize GL by calling into methods that should be
internal to the gl bindings code. Instead, everyone should go through
GLSurface::InitializeOneOff.
Also GLSurface::InitializeOneOff early outs if it was already called,
leading to a pattern of initializing GL all over the place just in case
and not having a clear idea of where it should be set up. Instead, DCHECK
that it is not called more than once, and move calls to this method to
be during process startup for unit test suites instead of mid-test.
This adds two test variants of InitializeOneOff for tests to call, that
set up OSMesa or Mock GL bindings, via GLSurface::InitializeOneOff.
R=ben@chromium.org, piman@chromium.org, sievers@chromium.org, piman, sievers
BUG=270918
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247793
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=248049
Review URL: https://codereview.chromium.org/135213003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248557 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/pixel_test.cc')
-rw-r--r-- | cc/test/pixel_test.cc | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc index e84540e..38a2b54 100644 --- a/cc/test/pixel_test.cc +++ b/cc/test/pixel_test.cc @@ -23,7 +23,6 @@ #include "cc/test/pixel_test_utils.h" #include "cc/test/test_in_process_context_provider.h" #include "testing/gtest/include/gtest/gtest.h" -#include "ui/gl/gl_implementation.h" namespace cc { @@ -118,8 +117,6 @@ bool PixelTest::PixelsMatchReference(const base::FilePath& ref_file, } void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { - CHECK(gfx::InitializeStaticGLBindings(gfx::kGLImplementationOSMesaGL)); - output_surface_.reset( new PixelTestOutputSurface(new TestInProcessContextProvider)); output_surface_->BindToClient(output_surface_client_.get()); |