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

Unified Diff: third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp

Issue 1484853003: Ganesh: images upload to GPU performance fix (skip copying encoded data) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: process comment #101 and rebase to latest Created 5 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
Index: third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp b/third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp
index e047a0c2ca5846dbee0b0c09f746bd78051ada69..36bdece40c16b4f23b815a73d3edec8871f0668a 100644
--- a/third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp
@@ -54,6 +54,10 @@ void ThreadSafeDataTransport::setData(SharedBuffer* buffer, bool allDataReceived
}
MutexLocker locker(m_mutex);
+
+ // If all data was previously received, don't append more to it.
+ RELEASE_ASSERT(!(m_allDataReceived && newBufferQueue.size()));
+
m_newBufferQueue.appendVector(newBufferQueue);
newBufferQueue.clear();
m_allDataReceived = allDataReceived;

Powered by Google App Engine
This is Rietveld 408576698