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

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

Issue 1947763002: Early terminate WebGL markContextChanged calls when appropriate. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and minor logic tweak to fix tests Created 4 years, 7 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 cef880da0f1f1bf886c15be64c4dec1bd9304747..b3af584e3fa36295b5cecdc6f0e459bcfa903113 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -156,10 +156,14 @@ DrawingBuffer::~DrawingBuffer()
m_contextProvider.reset();
}
-void DrawingBuffer::markContentsChanged()
+bool DrawingBuffer::markContentsChanged()
{
- m_contentsChanged = true;
- m_contentsChangeCommitted = false;
+ if (m_contentsChangeCommitted || !m_contentsChanged) {
+ m_contentsChangeCommitted = false;
+ m_contentsChanged = true;
+ return true;
+ }
+ return false;
}
bool DrawingBuffer::bufferClearNeeded() const
« 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