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

Unified Diff: cc/output/shader_unittest.cc

Issue 93433004: Use GLES2Interface for shaders and programs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
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
danakj 2013/12/03 19:24:49 Comment needs updating, and verify this is still t
jamesr 2013/12/04 01:50:21 Good catch. It isn't - I've changed this back to
// 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

Powered by Google App Engine
This is Rietveld 408576698