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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 2597933002: Avoid to resolve CMAA for read and draw without content changed or with content committed. (Closed)
Patch Set: rebase code Created 3 years, 8 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: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
index 909e548229317c4bcb33c808427e72162135df73..21000f7f4e2158b3e42e07a5538799bcf9dd958a 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -968,7 +968,7 @@ bool DrawingBuffer::resizeFramebufferInternal(const IntSize& newSize) {
}
void DrawingBuffer::resolveAndBindForReadAndDraw() {
- {
+ if (m_contentsChanged) {
dshwang 2017/04/08 02:16:32 I think it's better to change m_antiAliasingMode !
Zhenyao Mo 2017/04/12 23:38:08 I agree !m_contentsChangeResolved is a better cond
xinghua.cao 2017/04/13 10:50:24 It seems a repeating condition here, thank you.
ScopedStateRestorer scopedStateRestorer(this);
resolveIfNeeded();
}
@@ -1006,7 +1006,8 @@ void DrawingBuffer::resolveMultisampleFramebufferInternal() {
}
m_gl->BindFramebuffer(GL_FRAMEBUFFER, m_fbo);
- if (m_antiAliasingMode == ScreenSpaceAntialiasing)
+ if (m_antiAliasingMode == ScreenSpaceAntialiasing &&
+ !m_contentsChangeResolved)
m_gl->ApplyScreenSpaceAntialiasingCHROMIUM();
}
« 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