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

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

Issue 2543123003: gpu, cmaa: improve |do_copy| condition logic (Closed)
Patch Set: Created 4 years 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 | « gpu/command_buffer/service/framebuffer_manager.cc ('k') | 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_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) {
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698