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

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

Issue 634313002: Add mouse input forwarding to gpu service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Security Test Created 6 years 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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/hash.h" 9 #include "base/hash.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 18 matching lines...) Expand all
29 #include "gpu/command_buffer/common/mailbox.h" 29 #include "gpu/command_buffer/common/mailbox.h"
30 #include "gpu/command_buffer/service/gl_context_virtual.h" 30 #include "gpu/command_buffer/service/gl_context_virtual.h"
31 #include "gpu/command_buffer/service/gl_state_restorer_impl.h" 31 #include "gpu/command_buffer/service/gl_state_restorer_impl.h"
32 #include "gpu/command_buffer/service/image_factory.h" 32 #include "gpu/command_buffer/service/image_factory.h"
33 #include "gpu/command_buffer/service/image_manager.h" 33 #include "gpu/command_buffer/service/image_manager.h"
34 #include "gpu/command_buffer/service/logger.h" 34 #include "gpu/command_buffer/service/logger.h"
35 #include "gpu/command_buffer/service/mailbox_manager.h" 35 #include "gpu/command_buffer/service/mailbox_manager.h"
36 #include "gpu/command_buffer/service/memory_tracking.h" 36 #include "gpu/command_buffer/service/memory_tracking.h"
37 #include "gpu/command_buffer/service/query_manager.h" 37 #include "gpu/command_buffer/service/query_manager.h"
38 #include "gpu/command_buffer/service/sync_point_manager.h" 38 #include "gpu/command_buffer/service/sync_point_manager.h"
39 #include "gpu/command_buffer/service/valuebuffer_manager.h"
39 #include "ui/gl/gl_bindings.h" 40 #include "ui/gl/gl_bindings.h"
40 #include "ui/gl/gl_switches.h" 41 #include "ui/gl/gl_switches.h"
41 42
42 #if defined(OS_WIN) 43 #if defined(OS_WIN)
43 #include "content/public/common/sandbox_init.h" 44 #include "content/public/common/sandbox_init.h"
44 #endif 45 #endif
45 46
46 #if defined(OS_ANDROID) 47 #if defined(OS_ANDROID)
47 #include "content/common/gpu/stream_texture_android.h" 48 #include "content/common/gpu/stream_texture_android.h"
48 #endif 49 #endif
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 return new DevToolsChannelData(res.release()); 143 return new DevToolsChannelData(res.release());
143 } 144 }
144 145
145 } // namespace 146 } // namespace
146 147
147 GpuCommandBufferStub::GpuCommandBufferStub( 148 GpuCommandBufferStub::GpuCommandBufferStub(
148 GpuChannel* channel, 149 GpuChannel* channel,
149 GpuCommandBufferStub* share_group, 150 GpuCommandBufferStub* share_group,
150 const gfx::GLSurfaceHandle& handle, 151 const gfx::GLSurfaceHandle& handle,
151 gpu::gles2::MailboxManager* mailbox_manager, 152 gpu::gles2::MailboxManager* mailbox_manager,
153 gpu::gles2::ValuebufferManager* valuebuffer_manager,
152 const gfx::Size& size, 154 const gfx::Size& size,
153 const gpu::gles2::DisallowedFeatures& disallowed_features, 155 const gpu::gles2::DisallowedFeatures& disallowed_features,
154 const std::vector<int32>& attribs, 156 const std::vector<int32>& attribs,
155 gfx::GpuPreference gpu_preference, 157 gfx::GpuPreference gpu_preference,
156 bool use_virtualized_gl_context, 158 bool use_virtualized_gl_context,
157 int32 route_id, 159 int32 route_id,
158 int32 surface_id, 160 int32 surface_id,
159 GpuWatchdog* watchdog, 161 GpuWatchdog* watchdog,
160 bool software, 162 bool software,
161 const GURL& active_url) 163 const GURL& active_url)
(...skipping 21 matching lines...) Expand all
183 gpu::gles2::ContextCreationAttribHelper attrib_parser; 185 gpu::gles2::ContextCreationAttribHelper attrib_parser;
184 attrib_parser.Parse(requested_attribs_); 186 attrib_parser.Parse(requested_attribs_);
185 187
186 if (share_group) { 188 if (share_group) {
187 context_group_ = share_group->context_group_; 189 context_group_ = share_group->context_group_;
188 DCHECK(context_group_->bind_generates_resource() == 190 DCHECK(context_group_->bind_generates_resource() ==
189 attrib_parser.bind_generates_resource); 191 attrib_parser.bind_generates_resource);
190 } else { 192 } else {
191 context_group_ = new gpu::gles2::ContextGroup( 193 context_group_ = new gpu::gles2::ContextGroup(
192 mailbox_manager, 194 mailbox_manager,
195 valuebuffer_manager,
193 new GpuCommandBufferMemoryTracker(channel), 196 new GpuCommandBufferMemoryTracker(channel),
194 channel_->gpu_channel_manager()->shader_translator_cache(), 197 channel_->gpu_channel_manager()->shader_translator_cache(),
195 NULL, 198 NULL,
196 attrib_parser.bind_generates_resource); 199 attrib_parser.bind_generates_resource);
197 } 200 }
198 201
199 use_virtualized_gl_context_ |= 202 use_virtualized_gl_context_ |=
200 context_group_->feature_info()->workarounds().use_virtualized_gl_contexts; 203 context_group_->feature_info()->workarounds().use_virtualized_gl_contexts;
201 } 204 }
202 205
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 uint64 GpuCommandBufferStub::GetMemoryUsage() const { 1089 uint64 GpuCommandBufferStub::GetMemoryUsage() const {
1087 return GetMemoryManager()->GetClientMemoryUsage(this); 1090 return GetMemoryManager()->GetClientMemoryUsage(this);
1088 } 1091 }
1089 1092
1090 void GpuCommandBufferStub::SwapBuffersCompleted( 1093 void GpuCommandBufferStub::SwapBuffersCompleted(
1091 const std::vector<ui::LatencyInfo>& latency_info) { 1094 const std::vector<ui::LatencyInfo>& latency_info) {
1092 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info)); 1095 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, latency_info));
1093 } 1096 }
1094 1097
1095 } // namespace content 1098 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698