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

Unified Diff: cc/output/shader_unittest.cc

Issue 92593004: Use GLES2Interface for shader programs Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/shader.cc ('k') | cc/test/test_context_provider.h » ('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 a608d93bc13d78d9bde56aeac3d941dbc43aeb29..673b6057c68ebad7792c91e0e2cd960bfc2cb1c8 100644
--- a/cc/output/shader_unittest.cc
+++ b/cc/output/shader_unittest.cc
@@ -4,7 +4,7 @@
#include "cc/output/shader.h"
-#include "cc/test/fake_web_graphics_context_3d.h"
+#include "gpu/command_buffer/client/gles2_interface_stub.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/point.h"
#include "ui/gfx/size.h"
@@ -14,7 +14,7 @@ namespace cc {
TEST(ShaderTest, HighpThresholds) {
// The FakeWebGraphicsContext3D always uses a mediump precision of 10 bits
// which corresponds to a native highp threshold of 2^10 = 1024
- FakeWebGraphicsContext3D context;
+ gpu::gles2::GLES2InterfaceStub stub_context;
int threshold_cache = 0;
int threshold_min;
@@ -25,23 +25,23 @@ TEST(ShaderTest, HighpThresholds) {
threshold_min = 0;
EXPECT_EQ(TexCoordPrecisionMedium, TexCoordPrecisionRequired(
- &context, &threshold_cache, threshold_min, closePoint));
+ &stub_context, &threshold_cache, threshold_min, closePoint));
EXPECT_EQ(TexCoordPrecisionMedium, TexCoordPrecisionRequired(
- &context, &threshold_cache, threshold_min, smallSize));
+ &stub_context, &threshold_cache, threshold_min, smallSize));
EXPECT_EQ(TexCoordPrecisionHigh, TexCoordPrecisionRequired(
- &context, &threshold_cache, threshold_min, farPoint));
+ &stub_context, &threshold_cache, threshold_min, farPoint));
EXPECT_EQ(TexCoordPrecisionHigh, TexCoordPrecisionRequired(
- &context, &threshold_cache, threshold_min, bigSize));
+ &stub_context, &threshold_cache, threshold_min, bigSize));
threshold_min = 3000;
EXPECT_EQ(TexCoordPrecisionMedium, TexCoordPrecisionRequired(
- &context, &threshold_cache, threshold_min, closePoint));
+ &stub_context, &threshold_cache, threshold_min, closePoint));
EXPECT_EQ(TexCoordPrecisionMedium, TexCoordPrecisionRequired(
- &context, &threshold_cache, threshold_min, smallSize));
+ &stub_context, &threshold_cache, threshold_min, smallSize));
EXPECT_EQ(TexCoordPrecisionMedium, TexCoordPrecisionRequired(
- &context, &threshold_cache, threshold_min, farPoint));
+ &stub_context, &threshold_cache, threshold_min, farPoint));
EXPECT_EQ(TexCoordPrecisionMedium, TexCoordPrecisionRequired(
- &context, &threshold_cache, threshold_min, bigSize));
+ &stub_context, &threshold_cache, threshold_min, bigSize));
}
} // namespace cc
« no previous file with comments | « cc/output/shader.cc ('k') | cc/test/test_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698