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

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

Issue 2793653002: Fix non-anti-aliased frame update. (Closed)
Patch Set: Renamed resolve() to resolveIfNeeded() Created 3 years, 9 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 | « third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h ('k') | 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 b967171ef7eaaa503f805f4cca17ac8717e9f088..21a819cfb03f7de8f1b4ca36f77b0cdd135a8045 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -168,8 +168,8 @@ DrawingBuffer::~DrawingBuffer() {
}
bool DrawingBuffer::markContentsChanged() {
- if (m_contentsChangeCommitted || !m_contentsChanged) {
- m_contentsChangeCommitted = false;
+ if (m_contentsChangeResolved || !m_contentsChanged) {
+ m_contentsChangeResolved = false;
m_contentsChanged = true;
return true;
}
@@ -284,8 +284,7 @@ bool DrawingBuffer::prepareTextureMailboxInternal(
(*m_newMailboxCallback)();
// Resolve the multisampled buffer into m_backColorBuffer texture.
- if (m_antiAliasingMode != None)
- resolveMultisampleFramebufferInternal();
+ resolveIfNeeded();
if (m_softwareRendering && !forceGpuResult) {
return finishPrepareTextureMailboxSoftware(outMailbox, outReleaseCallback);
@@ -695,8 +694,7 @@ bool DrawingBuffer::copyToPlatformTexture(gpu::gles2::GLES2Interface* gl,
ScopedStateRestorer scopedStateRestorer(this);
if (m_contentsChanged) {
- if (m_antiAliasingMode != None)
- resolveMultisampleFramebufferInternal();
+ resolveIfNeeded();
m_gl->Flush();
}
@@ -971,7 +969,7 @@ bool DrawingBuffer::resizeFramebufferInternal(const IntSize& newSize) {
void DrawingBuffer::resolveAndBindForReadAndDraw() {
{
ScopedStateRestorer scopedStateRestorer(this);
- resolveMultisampleFramebufferInternal();
+ resolveIfNeeded();
}
m_gl->BindFramebuffer(GL_FRAMEBUFFER, m_fbo);
}
@@ -979,7 +977,7 @@ void DrawingBuffer::resolveAndBindForReadAndDraw() {
void DrawingBuffer::resolveMultisampleFramebufferInternal() {
DCHECK(m_stateRestorer);
m_stateRestorer->setFramebufferBindingDirty();
- if (wantExplicitResolve() && !m_contentsChangeCommitted) {
+ if (wantExplicitResolve() && !m_contentsChangeResolved) {
m_stateRestorer->setClearStateDirty();
m_gl->BindFramebuffer(GL_READ_FRAMEBUFFER_ANGLE, m_multisampleFBO);
m_gl->BindFramebuffer(GL_DRAW_FRAMEBUFFER_ANGLE, m_fbo);
@@ -1009,7 +1007,12 @@ void DrawingBuffer::resolveMultisampleFramebufferInternal() {
m_gl->BindFramebuffer(GL_FRAMEBUFFER, m_fbo);
if (m_antiAliasingMode == ScreenSpaceAntialiasing)
m_gl->ApplyScreenSpaceAntialiasingCHROMIUM();
- m_contentsChangeCommitted = true;
+}
+
+void DrawingBuffer::resolveIfNeeded() {
+ if (m_antiAliasingMode != None)
+ resolveMultisampleFramebufferInternal();
+ m_contentsChangeResolved = true;
}
void DrawingBuffer::restoreFramebufferBindings() {
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698