diff options
Diffstat (limited to 'chromium/components/viz/service/display/shader_unittest.cc')
-rw-r--r-- | chromium/components/viz/service/display/shader_unittest.cc | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/chromium/components/viz/service/display/shader_unittest.cc b/chromium/components/viz/service/display/shader_unittest.cc index c05da251fe5..6990cbf14de 100644 --- a/chromium/components/viz/service/display/shader_unittest.cc +++ b/chromium/components/viz/service/display/shader_unittest.cc @@ -4,8 +4,8 @@ #include "components/viz/service/display/shader.h" +#include "components/viz/test/test_context_provider.h" #include "components/viz/test/test_gles2_interface.h" -#include "components/viz/test/test_web_graphics_context_3d.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/size.h" @@ -13,12 +13,11 @@ namespace viz { TEST(ShaderTest, HighpThresholds) { - // The test context always uses a mediump precision of 10 bits which + // The test gl always uses a mediump precision of 10 bits which // corresponds to a native highp threshold of 2^10 = 1024 - std::unique_ptr<TestWebGraphicsContext3D> test_context = - TestWebGraphicsContext3D::Create(); - TestGLES2Interface test_gl; - test_gl.set_test_context(test_context.get()); + scoped_refptr<TestContextProvider> provider = TestContextProvider::Create(); + provider->BindToCurrentThread(); + gpu::gles2::GLES2Interface* test_gl = provider->ContextGL(); int threshold_cache = 0; int threshold_min; @@ -29,30 +28,30 @@ TEST(ShaderTest, HighpThresholds) { threshold_min = 0; EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM, - TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min, + TexCoordPrecisionRequired(test_gl, &threshold_cache, threshold_min, closePoint)); EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM, - TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min, + TexCoordPrecisionRequired(test_gl, &threshold_cache, threshold_min, smallSize)); EXPECT_EQ(TEX_COORD_PRECISION_HIGH, - TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min, + TexCoordPrecisionRequired(test_gl, &threshold_cache, threshold_min, farPoint)); EXPECT_EQ(TEX_COORD_PRECISION_HIGH, - TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min, + TexCoordPrecisionRequired(test_gl, &threshold_cache, threshold_min, bigSize)); threshold_min = 3000; EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM, - TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min, + TexCoordPrecisionRequired(test_gl, &threshold_cache, threshold_min, closePoint)); EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM, - TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min, + TexCoordPrecisionRequired(test_gl, &threshold_cache, threshold_min, smallSize)); EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM, - TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min, + TexCoordPrecisionRequired(test_gl, &threshold_cache, threshold_min, farPoint)); EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM, - TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min, + TexCoordPrecisionRequired(test_gl, &threshold_cache, threshold_min, bigSize)); } |