summaryrefslogtreecommitdiff
path: root/chromium/components/viz/service/display/scoped_render_pass_texture.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/viz/service/display/scoped_render_pass_texture.cc')
-rw-r--r--chromium/components/viz/service/display/scoped_render_pass_texture.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chromium/components/viz/service/display/scoped_render_pass_texture.cc b/chromium/components/viz/service/display/scoped_render_pass_texture.cc
index 3d9a0abfca2..7f69f85dec7 100644
--- a/chromium/components/viz/service/display/scoped_render_pass_texture.cc
+++ b/chromium/components/viz/service/display/scoped_render_pass_texture.cc
@@ -4,6 +4,8 @@
#include "components/viz/service/display/scoped_render_pass_texture.h"
+#include <algorithm>
+
#include "base/bits.h"
#include "base/logging.h"
#include "components/viz/common/gpu/context_provider.h"
@@ -50,6 +52,7 @@ ScopedRenderPassTexture::ScopedRenderPassTexture(
gl->TexStorage2DEXT(GL_TEXTURE_2D, levels, TextureStorageFormat(format),
size_.width(), size_.height());
} else {
+ DCHECK(GLSupportsFormat(format));
gl->TexImage2D(GL_TEXTURE_2D, 0, GLInternalFormat(format), size_.width(),
size_.height(), 0, GLDataFormat(format), GLDataType(format),
nullptr);