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

Unified Diff: cc/output/shader_unittest.cc

Issue 2161323002: cc: Make LayerTreeHostImpl unittests use a delegating output surface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: display-lthi-tests: . Created 4 years, 5 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
« no previous file with comments | « cc/output/renderer_unittest.cc ('k') | cc/output/software_renderer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/shader_unittest.cc
diff --git a/cc/output/shader_unittest.cc b/cc/output/shader_unittest.cc
index 78850184ad2f2fd7bd6cefe9751b43bbed099a32..6dad24f5af27d73f356ba0501a762b47382eb02d 100644
--- a/cc/output/shader_unittest.cc
+++ b/cc/output/shader_unittest.cc
@@ -15,9 +15,10 @@ namespace cc {
TEST(ShaderTest, HighpThresholds) {
// The test context always uses a mediump precision of 10 bits which
// corresponds to a native highp threshold of 2^10 = 1024
- std::unique_ptr<TestWebGraphicsContext3D> stub_context =
+ std::unique_ptr<TestWebGraphicsContext3D> test_context =
TestWebGraphicsContext3D::Create();
- TestGLES2Interface stub_gl(stub_context.get());
+ TestGLES2Interface test_gl;
+ test_gl.set_test_context(test_context.get());
int threshold_cache = 0;
int threshold_min;
@@ -28,30 +29,30 @@ TEST(ShaderTest, HighpThresholds) {
threshold_min = 0;
EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM,
- TexCoordPrecisionRequired(&stub_gl, &threshold_cache, threshold_min,
+ TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min,
closePoint));
EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM,
- TexCoordPrecisionRequired(&stub_gl, &threshold_cache, threshold_min,
+ TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min,
smallSize));
EXPECT_EQ(TEX_COORD_PRECISION_HIGH,
- TexCoordPrecisionRequired(&stub_gl, &threshold_cache, threshold_min,
+ TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min,
farPoint));
EXPECT_EQ(TEX_COORD_PRECISION_HIGH,
- TexCoordPrecisionRequired(&stub_gl, &threshold_cache, threshold_min,
+ TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min,
bigSize));
threshold_min = 3000;
EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM,
- TexCoordPrecisionRequired(&stub_gl, &threshold_cache, threshold_min,
+ TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min,
closePoint));
EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM,
- TexCoordPrecisionRequired(&stub_gl, &threshold_cache, threshold_min,
+ TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min,
smallSize));
EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM,
- TexCoordPrecisionRequired(&stub_gl, &threshold_cache, threshold_min,
+ TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min,
farPoint));
EXPECT_EQ(TEX_COORD_PRECISION_MEDIUM,
- TexCoordPrecisionRequired(&stub_gl, &threshold_cache, threshold_min,
+ TexCoordPrecisionRequired(&test_gl, &threshold_cache, threshold_min,
bigSize));
}
« no previous file with comments | « cc/output/renderer_unittest.cc ('k') | cc/output/software_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698