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

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: chrishtr@ and scroggo@'s comments processing - simplify erroneus setData handling 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..00da86509e5ab2f5879ff49735b19f13191d4c0d 100644
--- a/third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ThreadSafeDataTransport.cpp
@@ -54,6 +54,14 @@ void ThreadSafeDataTransport::setData(SharedBuffer* buffer, bool allDataReceived
}
MutexLocker locker(m_mutex);
+ if (m_allDataReceived && newBufferQueue.size()) {
chrishtr 2015/12/03 17:51:51 Is this code reachable in one of your testcases? N
aleksandar.stojiljkovic 2015/12/03 18:04:14 No, it is not reachable and it mustn't be. It wasn
chrishtr 2015/12/03 18:32:00 If it is not something that can happen, just put i
aleksandar.stojiljkovic 2015/12/03 21:17:09 Done.
+ // This prevents from unexisting use case now - if all data was previously
+ // received, don't append more to it.
+ ASSERT(false);
+ newBufferQueue.clear();
+ return;
+ }
+
m_newBufferQueue.appendVector(newBufferQueue);
newBufferQueue.clear();
m_allDataReceived = allDataReceived;

Powered by Google App Engine
This is Rietveld 408576698