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

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 2777973002: gpu: Replace GpuHostMsg_Initialized with mojom api. (Closed)
Patch Set: Created 3 years, 9 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 | « content/browser/gpu/gpu_process_host.h ('k') | content/common/gpu_host_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index ed864397760767e3824755dd40ef6db72ee94162..643b6418edf464f6be312817f337762799bd05e7 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -703,7 +703,6 @@ void GpuProcessHost::AddFilter(IPC::MessageFilter* filter) {
bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) {
DCHECK(CalledOnValidThread());
IPC_BEGIN_MESSAGE_MAP(GpuProcessHost, message)
- IPC_MESSAGE_HANDLER(GpuHostMsg_Initialized, OnInitialized)
IPC_MESSAGE_HANDLER(GpuHostMsg_GpuMemoryBufferCreated,
OnGpuMemoryBufferCreated)
IPC_MESSAGE_HANDLER(GpuHostMsg_FieldTrialActivated, OnFieldTrialActivated);
@@ -804,22 +803,6 @@ void GpuProcessHost::SendDestroyingVideoSurface(int surface_id,
}
#endif
-void GpuProcessHost::OnInitialized(
- bool result,
- const gpu::GPUInfo& gpu_info,
- const gpu::GpuFeatureInfo& gpu_feature_info) {
- UMA_HISTOGRAM_BOOLEAN("GPU.GPUProcessInitialized", result);
- initialized_ = result;
- gpu_info_ = gpu_info;
-
- if (!initialized_) {
- GpuDataManagerImpl::GetInstance()->OnGpuProcessInitFailure();
- return;
- }
- GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info);
- GpuDataManagerImpl::GetInstance()->UpdateGpuFeatureInfo(gpu_feature_info);
-}
-
void GpuProcessHost::OnChannelEstablished(
int client_id,
const EstablishChannelCallback& callback,
@@ -905,11 +888,17 @@ void GpuProcessHost::OnProcessCrashed(int exit_code) {
void GpuProcessHost::DidInitialize(
const gpu::GPUInfo& gpu_info,
const gpu::GpuFeatureInfo& gpu_feature_info) {
- // TODO(sad): This should call OnInitialized().
+ UMA_HISTOGRAM_BOOLEAN("GPU.GPUProcessInitialized", true);
+ initialized_ = true;
+ gpu_info_ = gpu_info;
+ GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info);
+ GpuDataManagerImpl::GetInstance()->UpdateGpuFeatureInfo(gpu_feature_info);
}
void GpuProcessHost::DidFailInitialize() {
- // TODO(sad): This should call GpuDataManagerImpl::OnGpuProcessInitFailure().
+ UMA_HISTOGRAM_BOOLEAN("GPU.GPUProcessInitialized", false);
+ initialized_ = false;
+ GpuDataManagerImpl::GetInstance()->OnGpuProcessInitFailure();
}
void GpuProcessHost::DidCreateOffscreenContext(const GURL& url) {
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/common/gpu_host_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698