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

Unified Diff: components/mus/common/gpu_service.cc

Issue 2049083002: Implement MusGpuMemoryBufferManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 6 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
Index: components/mus/common/gpu_service.cc
diff --git a/components/mus/common/gpu_service.cc b/components/mus/common/gpu_service.cc
index 37c0635078b4a1920dddd9241ac26f1b235f6f59..73049e520580245420c5139a0ce9b3e9a5e6b61b 100644
--- a/components/mus/common/gpu_service.cc
+++ b/components/mus/common/gpu_service.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/memory/singleton.h"
+#include "base/threading/thread_restrictions.h"
#include "components/mus/common/gpu_type_converters.h"
#include "components/mus/common/mojo_gpu_memory_buffer_manager.h"
#include "components/mus/common/switches.h"
@@ -72,10 +73,14 @@ scoped_refptr<gpu::GpuChannelHost> GpuService::EstablishGpuChannel(
gpu::GPUInfo gpu_info;
gpu_service->EstablishGpuChannel(base::Bind(
&GpuChannelEstablishCallback, &client_id, &channel_handle, &gpu_info));
- if (!gpu_service.WaitForIncomingResponse()) {
- DLOG(WARNING)
- << "Channel encountered error while establishing gpu channel.";
- return nullptr;
+
+ {
+ base::ThreadRestrictions::ScopedAllowWait allow_wait;
jam 2016/06/09 16:01:45 why is this needed? i.e. what's the callstack that
Peng 2016/06/09 17:40:29 The call stack is listed below. I don't think ther
+ if (!gpu_service.WaitForIncomingResponse()) {
+ DLOG(WARNING)
+ << "Channel encountered error while establishing gpu channel.";
+ return nullptr;
+ }
}
gpu_channel_ = gpu::GpuChannelHost::Create(this, client_id, gpu_info,
channel_handle, &shutdown_event_,

Powered by Google App Engine
This is Rietveld 408576698