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

Unified Diff: ui/gl/test/gl_image_test_template.h

Issue 2038133004: Make NativePixmap unittests use TEXTURE_EXTERNAL_OES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « ui/gl/gl_image_ozone_native_pixmap_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/test/gl_image_test_template.h
diff --git a/ui/gl/test/gl_image_test_template.h b/ui/gl/test/gl_image_test_template.h
index 175ac345679bedc0a4039572d1be3fd4c1f193f0..7203f0f63e72507ccb2d67b31f61e7b505b85249 100644
--- a/ui/gl/test/gl_image_test_template.h
+++ b/ui/gl/test/gl_image_test_template.h
@@ -67,8 +67,8 @@ GLuint LoadFragmentShader(unsigned target, const gfx::Size& size) {
case GL_TEXTURE_RECTANGLE_ARB:
return GLHelper::LoadShader(
GL_FRAGMENT_SHADER,
- base::StringPrintf("%s\n"
- "#extension GL_ARB_texture_rectangle : require\n"
+ base::StringPrintf("#extension GL_ARB_texture_rectangle : require\n"
+ "%s\n"
"#define SamplerType sampler2DRect\n"
"#define TextureLookup texture2DRect\n"
"#define TextureScale vec2(%f, %f)\n"
@@ -78,6 +78,18 @@ GLuint LoadFragmentShader(unsigned target, const gfx::Size& size) {
static_cast<double>(size.height()),
kFragmentShader)
.c_str());
+ case GL_TEXTURE_EXTERNAL_OES:
+ return GLHelper::LoadShader(
+ GL_FRAGMENT_SHADER,
+ base::StringPrintf("#extension GL_OES_EGL_image_external : require\n"
+ "%s\n"
+ "#define SamplerType samplerExternalOES\n"
+ "#define TextureLookup texture2D\n"
+ "#define TextureScale vec2(1.0, 1.0)\n"
+ "%s",
+ is_gles ? kShaderFloatPrecision : "",
+ kFragmentShader)
+ .c_str());
default:
NOTREACHED();
return 0;
« no previous file with comments | « ui/gl/gl_image_ozone_native_pixmap_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698