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

Unified Diff: gpu/command_buffer/client/transfer_buffer.cc

Issue 2866973003: Fix global dumps to be dumped only when shared memory is actually used
Patch Set: Remove change for GpuMemoryBuffer Created 3 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 | « gpu/command_buffer/client/transfer_buffer.h ('k') | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/transfer_buffer.cc
diff --git a/gpu/command_buffer/client/transfer_buffer.cc b/gpu/command_buffer/client/transfer_buffer.cc
index 161c836c3ae87b3c88d754a045cef24f8bb2e8ee..3c9efadc7b02aaf112aea9b4e494548bf0e094e1 100644
--- a/gpu/command_buffer/client/transfer_buffer.cc
+++ b/gpu/command_buffer/client/transfer_buffer.cc
@@ -195,6 +195,14 @@ unsigned int TransferBuffer::GetMaxAllocation() const {
return HaveBuffer() ? max_buffer_size_ - result_size_ : 0;
}
+bool TransferBuffer::is_shared() const {
+ if (!HaveBuffer())
+ return false;
+ if (!buffer_->backing())
+ return false;
+ return buffer_->backing()->is_shared();
+}
+
void ScopedTransferBufferPtr::Release() {
if (buffer_) {
transfer_buffer_->FreePendingToken(buffer_, helper_->InsertToken());
« no previous file with comments | « gpu/command_buffer/client/transfer_buffer.h ('k') | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698