Index: gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc b/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc |
index a8d5e4354b29a22f14c719c7f4176c9c64e9f366..eca067cee84c79ff48aa1ceab8a7af5b0f9d3c97 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc |
@@ -8,6 +8,7 @@ |
#include "gpu/command_buffer/service/framebuffer_manager.h" |
#include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h" |
#include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
+#include "gpu/command_buffer/service/texture_manager.h" |
#include "ui/gl/gl_context.h" |
#include "ui/gl/gl_gl_api_implementation.h" |
#include "ui/gl/gl_version_info.h" |
@@ -241,7 +242,11 @@ void ApplyFramebufferAttachmentCMAAINTELResourceManager:: |
// CMAA internally expects GL_RGBA8 textures. |
// Process using a GL_RGBA8 copy if this is not the case. |
- bool do_copy = internal_format != GL_RGBA8; |
+ const bool rgba_immutable = |
+ attachment->IsTextureAttachmentImmutable() && |
piman
2016/12/02 20:36:46
Well, you already know you have a texture attachme
dshwang
2016/12/02 23:40:24
We cannot get TextureRef/Texture from Framebuffer:
piman
2016/12/05 20:07:08
attachment->object_name() gives you the client tex
dshwang
2016/12/09 03:23:27
Done. Thank you for educating :)
|
+ TextureManager::ExtractFormatFromStorageFormat(internal_format) == |
+ GL_RGBA; |
+ const bool do_copy = !rgba_immutable; |
// CMAA Effect |
if (do_copy) { |