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

Side by Side Diff: content/common/gpu/gpu_channel.cc

Issue 634313002: Add mouse input forwarding to gpu service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: piman@ review Created 6 years, 1 month 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
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 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <windows.h> 6 #include <windows.h>
7 #endif 7 #endif
8 8
9 #include "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
10 10
11 #include <queue> 11 #include <queue>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/debug/trace_event.h" 16 #include "base/debug/trace_event.h"
17 #include "base/message_loop/message_loop_proxy.h" 17 #include "base/message_loop/message_loop_proxy.h"
18 #include "base/stl_util.h" 18 #include "base/stl_util.h"
19 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
20 #include "base/timer/timer.h" 20 #include "base/timer/timer.h"
21 #include "content/common/gpu/devtools_gpu_agent.h" 21 #include "content/common/gpu/devtools_gpu_agent.h"
22 #include "content/common/gpu/gpu_channel_manager.h" 22 #include "content/common/gpu/gpu_channel_manager.h"
23 #include "content/common/gpu/gpu_messages.h" 23 #include "content/common/gpu/gpu_messages.h"
24 #include "content/public/common/content_switches.h" 24 #include "content/public/common/content_switches.h"
25 #include "gpu/command_buffer/common/mailbox.h" 25 #include "gpu/command_buffer/common/mailbox.h"
26 #include "gpu/command_buffer/service/gpu_scheduler.h" 26 #include "gpu/command_buffer/service/gpu_scheduler.h"
27 #include "gpu/command_buffer/service/mailbox_manager_impl.h" 27 #include "gpu/command_buffer/service/mailbox_manager_impl.h"
28 #include "gpu/command_buffer/service/sync_point_manager.h" 28 #include "gpu/command_buffer/service/sync_point_manager.h"
29 #include "gpu/command_buffer/service/valuebuffer_manager.h"
29 #include "ipc/ipc_channel.h" 30 #include "ipc/ipc_channel.h"
30 #include "ipc/message_filter.h" 31 #include "ipc/message_filter.h"
31 #include "ui/gl/gl_context.h" 32 #include "ui/gl/gl_context.h"
32 #include "ui/gl/gl_surface.h" 33 #include "ui/gl/gl_surface.h"
33 34
34 #if defined(OS_POSIX) 35 #if defined(OS_POSIX)
35 #include "ipc/ipc_channel_posix.h" 36 #include "ipc/ipc_channel_posix.h"
36 #endif 37 #endif
37 38
38 namespace content { 39 namespace content {
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 813
813 uint64 GpuChannel::GetMemoryUsage() { 814 uint64 GpuChannel::GetMemoryUsage() {
814 uint64 size = 0; 815 uint64 size = 0;
815 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); 816 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_);
816 !it.IsAtEnd(); it.Advance()) { 817 !it.IsAtEnd(); it.Advance()) {
817 size += it.GetCurrentValue()->GetMemoryUsage(); 818 size += it.GetCurrentValue()->GetMemoryUsage();
818 } 819 }
819 return size; 820 return size;
820 } 821 }
821 822
823 void GpuChannel::HandleUpdateValueState(
824 unsigned int target, const gpu::ValueState& state) {
825 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_);
826 !it.IsAtEnd(); it.Advance()) {
827 gpu::gles2::GLES2Decoder* decoder = it.GetCurrentValue()->decoder();
828 if (decoder) {
829 decoder->GetValuebufferManager()->UpdateValueState(target, state);
830 }
831 }
832 }
833
822 } // namespace content 834 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698