| Index: gpu/command_buffer/service/framebuffer_manager.cc
|
| diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc
|
| index ccd593aac225d52313867ba0472f7b9312fd0adc..3c4fad310464583503e3f51d026b214dacee0681 100644
|
| --- a/gpu/command_buffer/service/framebuffer_manager.cc
|
| +++ b/gpu/command_buffer/service/framebuffer_manager.cc
|
| @@ -129,6 +129,8 @@ class RenderbufferAttachment
|
| return false;
|
| }
|
|
|
| + bool EmulatingRGB() const override { return false; }
|
| +
|
| protected:
|
| ~RenderbufferAttachment() override {}
|
|
|
| @@ -277,6 +279,10 @@ class TextureAttachment
|
| return texture == texture_ref_.get() && level == level_;
|
| }
|
|
|
| + bool EmulatingRGB() const override {
|
| + return texture_ref_->texture()->EmulatingRGB();
|
| + }
|
| +
|
| protected:
|
| ~TextureAttachment() override {}
|
|
|
| @@ -537,6 +543,10 @@ GLenum Framebuffer::GetReadBufferInternalFormat() const {
|
| return 0;
|
| }
|
| const Attachment* attachment = it->second.get();
|
| + if (attachment->EmulatingRGB()) {
|
| + DCHECK_EQ(static_cast<GLenum>(GL_RGBA), attachment->internal_format());
|
| + return GL_RGB;
|
| + }
|
| return attachment->internal_format();
|
| }
|
|
|
|
|