summaryrefslogtreecommitdiffstats
path: root/cc/output
diff options
context:
space:
mode:
authorsievers <sievers@chromium.org>2015-12-09 18:20:24 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-10 02:21:38 +0000
commit46c880331aaad20da0d966ca2240ff820bb41e28 (patch)
treef8416a538366f182e9a7bade6467dd14c047f09e /cc/output
parent0abc7bc07b778e12ffdce09cd157a3a1d77ccee6 (diff)
downloadchromium_src-46c880331aaad20da0d966ca2240ff820bb41e28.zip
chromium_src-46c880331aaad20da0d966ca2240ff820bb41e28.tar.gz
chromium_src-46c880331aaad20da0d966ca2240ff820bb41e28.tar.bz2
cc: Avoid crash on Android in GLRenderer
We don't really handle GetVideoStreamTextureProgram() returning null gracefully, so avoid the crash. However, any broken implementation that was crashing here will still not render embedded videos and cause GL errors (since successfull shader compilation and use of GLenums are also gated on the extension). BUG=350443 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1515723002 Cr-Commit-Position: refs/heads/master@{#364263}
Diffstat (limited to 'cc/output')
-rw-r--r--cc/output/gl_renderer.cc2
-rw-r--r--cc/output/gl_renderer_unittest.cc4
2 files changed, 2 insertions, 4 deletions
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 5c30003..d052233 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -3414,8 +3414,6 @@ const GLRenderer::VideoYUVAProgram* GLRenderer::GetVideoYUVAProgram(
const GLRenderer::VideoStreamTextureProgram*
GLRenderer::GetVideoStreamTextureProgram(TexCoordPrecision precision) {
- if (!Capabilities().using_egl_image)
- return NULL;
DCHECK_GE(precision, 0);
DCHECK_LE(precision, LAST_TEX_COORD_PRECISION);
VideoStreamTextureProgram* program =
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index 6c66ae7..97bd2d9 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -132,10 +132,10 @@ class GLRendererShaderPixelTest : public GLRendererPixelTest {
void TestShadersWithPrecision(TexCoordPrecision precision) {
EXPECT_PROGRAM_VALID(renderer()->GetTextureIOSurfaceProgram(precision));
+ // This program uses external textures and sampler, so it won't compile
+ // everywhere.
if (renderer()->Capabilities().using_egl_image)
EXPECT_PROGRAM_VALID(renderer()->GetVideoStreamTextureProgram(precision));
- else
- EXPECT_FALSE(renderer()->GetVideoStreamTextureProgram(precision));
}
void TestShadersWithPrecisionAndBlend(TexCoordPrecision precision,