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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2671523002: gpu: Correct GMB format for GL_RGB BackTexture. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 2d4579a4ec29cf91febd27803e636f3fbb14acde..bbff690e8991cb9ab32d3f9cc9bfbcf3d2fd965f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -2776,10 +2776,13 @@ GLenum BackTexture::Target() {
bool BackTexture::AllocateNativeGpuMemoryBuffer(const gfx::Size& size,
GLenum format,
bool zero) {
- gfx::BufferFormat buffer_format = gfx::BufferFormat::RGBA_8888;
+ DCHECK(format == GL_RGB || format == GL_RGBA);
scoped_refptr<gl::GLImage> image =
decoder_->GetContextGroup()->image_factory()->CreateAnonymousImage(
- size, buffer_format, format);
+ size,
+ format == GL_RGB ? gfx::BufferFormat::RGBX_8888
+ : gfx::BufferFormat::RGBA_8888,
+ format);
if (!image || !image->BindTexImage(Target()))
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698