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

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 1280513002: Add GenericSharedMemoryId and use w/ GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trackpools
Patch Set: remove "tracing" from name Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « content/content_common.gypi ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/gpu/gpu_child_thread.h" 5 #include "content/gpu/gpu_child_thread.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/worker_pool.h" 9 #include "base/threading/worker_pool.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 IPC_END_MESSAGE_MAP() 73 IPC_END_MESSAGE_MAP()
74 return handled; 74 return handled;
75 } 75 }
76 76
77 protected: 77 protected:
78 ~GpuMemoryBufferMessageFilter() override {} 78 ~GpuMemoryBufferMessageFilter() override {}
79 79
80 void OnCreateGpuMemoryBuffer( 80 void OnCreateGpuMemoryBuffer(
81 const GpuMsg_CreateGpuMemoryBuffer_Params& params) { 81 const GpuMsg_CreateGpuMemoryBuffer_Params& params) {
82 TRACE_EVENT2("gpu", "GpuMemoryBufferMessageFilter::OnCreateGpuMemoryBuffer", 82 TRACE_EVENT2("gpu", "GpuMemoryBufferMessageFilter::OnCreateGpuMemoryBuffer",
83 "id", params.id, "client_id", params.client_id); 83 "id", params.id.id, "client_id", params.client_id);
84 sender_->Send(new GpuHostMsg_GpuMemoryBufferCreated( 84 sender_->Send(new GpuHostMsg_GpuMemoryBufferCreated(
85 gpu_memory_buffer_factory_->CreateGpuMemoryBuffer( 85 gpu_memory_buffer_factory_->CreateGpuMemoryBuffer(
86 params.id, params.size, params.format, params.usage, 86 params.id, params.size, params.format, params.usage,
87 params.client_id, params.surface_handle))); 87 params.client_id, params.surface_handle)));
88 } 88 }
89 89
90 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; 90 GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
91 IPC::Sender* sender_; 91 IPC::Sender* sender_;
92 }; 92 };
93 93
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 } 351 }
352 } 352 }
353 353
354 void GpuChildThread::OnGpuSwitched() { 354 void GpuChildThread::OnGpuSwitched() {
355 DVLOG(1) << "GPU: GPU has switched"; 355 DVLOG(1) << "GPU: GPU has switched";
356 // Notify observers in the GPU process. 356 // Notify observers in the GPU process.
357 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched(); 357 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched();
358 } 358 }
359 359
360 } // namespace content 360 } // namespace content
361
OLDNEW
« no previous file with comments | « content/content_common.gypi ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698