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

Side by Side Diff: chrome/gpu/gpu_channel.cc

Issue 6623063: Connect up --disable-gl-multisampling to command buffer (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix style. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/gpu/gpu_channel.h ('k') | chrome/gpu/gpu_command_buffer_stub.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/gpu/gpu_channel.h" 9 #include "chrome/gpu/gpu_channel.h"
10 10
(...skipping 14 matching lines...) Expand all
25 GpuChannel::GpuChannel(GpuThread* gpu_thread, 25 GpuChannel::GpuChannel(GpuThread* gpu_thread,
26 int renderer_id) 26 int renderer_id)
27 : gpu_thread_(gpu_thread), 27 : gpu_thread_(gpu_thread),
28 renderer_id_(renderer_id), 28 renderer_id_(renderer_id),
29 renderer_process_(NULL), 29 renderer_process_(NULL),
30 renderer_pid_(NULL) { 30 renderer_pid_(NULL) {
31 DCHECK(gpu_thread); 31 DCHECK(gpu_thread);
32 DCHECK(renderer_id); 32 DCHECK(renderer_id);
33 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 33 const CommandLine* command_line = CommandLine::ForCurrentProcess();
34 log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages); 34 log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages);
35 disallowed_extensions_.multisampling =
36 command_line->HasSwitch(switches::kDisableGLMultisampling);
35 } 37 }
36 38
37 GpuChannel::~GpuChannel() { 39 GpuChannel::~GpuChannel() {
38 #if defined(OS_WIN) 40 #if defined(OS_WIN)
39 if (renderer_process_) 41 if (renderer_process_)
40 CloseHandle(renderer_process_); 42 CloseHandle(renderer_process_);
41 #endif 43 #endif
42 } 44 }
43 45
44 bool GpuChannel::OnMessageReceived(const IPC::Message& message) { 46 bool GpuChannel::OnMessageReceived(const IPC::Message& message) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void GpuChannel::CreateViewCommandBuffer( 90 void GpuChannel::CreateViewCommandBuffer(
89 gfx::PluginWindowHandle window, 91 gfx::PluginWindowHandle window,
90 int32 render_view_id, 92 int32 render_view_id,
91 const GPUCreateCommandBufferConfig& init_params, 93 const GPUCreateCommandBufferConfig& init_params,
92 int32* route_id) { 94 int32* route_id) {
93 *route_id = MSG_ROUTING_NONE; 95 *route_id = MSG_ROUTING_NONE;
94 96
95 #if defined(ENABLE_GPU) 97 #if defined(ENABLE_GPU)
96 *route_id = GenerateRouteID(); 98 *route_id = GenerateRouteID();
97 scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub( 99 scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub(
98 this, window, NULL, gfx::Size(), init_params.allowed_extensions, 100 this, window, NULL, gfx::Size(), disallowed_extensions_,
101 init_params.allowed_extensions,
99 init_params.attribs, 0, *route_id, renderer_id_, render_view_id)); 102 init_params.attribs, 0, *route_id, renderer_id_, render_view_id));
100 router_.AddRoute(*route_id, stub.get()); 103 router_.AddRoute(*route_id, stub.get());
101 stubs_.AddWithID(stub.release(), *route_id); 104 stubs_.AddWithID(stub.release(), *route_id);
102 #endif // ENABLE_GPU 105 #endif // ENABLE_GPU
103 } 106 }
104 107
105 #if defined(OS_MACOSX) 108 #if defined(OS_MACOSX)
106 void GpuChannel::AcceleratedSurfaceBuffersSwapped( 109 void GpuChannel::AcceleratedSurfaceBuffersSwapped(
107 int32 route_id, uint64 swap_buffers_count) { 110 int32 route_id, uint64 swap_buffers_count) {
108 GpuCommandBufferStub* stub = stubs_.Lookup(route_id); 111 GpuCommandBufferStub* stub = stubs_.Lookup(route_id);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 *route_id = GenerateRouteID(); 170 *route_id = GenerateRouteID();
168 GpuCommandBufferStub* parent_stub = NULL; 171 GpuCommandBufferStub* parent_stub = NULL;
169 if (parent_route_id != 0) 172 if (parent_route_id != 0)
170 parent_stub = stubs_.Lookup(parent_route_id); 173 parent_stub = stubs_.Lookup(parent_route_id);
171 174
172 scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub( 175 scoped_ptr<GpuCommandBufferStub> stub(new GpuCommandBufferStub(
173 this, 176 this,
174 gfx::kNullPluginWindow, 177 gfx::kNullPluginWindow,
175 parent_stub, 178 parent_stub,
176 size, 179 size,
180 disallowed_extensions_,
177 init_params.allowed_extensions, 181 init_params.allowed_extensions,
178 init_params.attribs, 182 init_params.attribs,
179 parent_texture_id, 183 parent_texture_id,
180 *route_id, 184 *route_id,
181 0, 0)); 185 0, 0));
182 router_.AddRoute(*route_id, stub.get()); 186 router_.AddRoute(*route_id, stub.get());
183 stubs_.AddWithID(stub.release(), *route_id); 187 stubs_.AddWithID(stub.release(), *route_id);
184 #else 188 #else
185 *route_id = MSG_ROUTING_NONE; 189 *route_id = MSG_ROUTING_NONE;
186 #endif 190 #endif
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 #if defined(OS_POSIX) 256 #if defined(OS_POSIX)
253 int GpuChannel::GetRendererFileDescriptor() { 257 int GpuChannel::GetRendererFileDescriptor() {
254 int fd = -1; 258 int fd = -1;
255 if (channel_.get()) { 259 if (channel_.get()) {
256 fd = channel_->GetClientFileDescriptor(); 260 fd = channel_->GetClientFileDescriptor();
257 } 261 }
258 return fd; 262 return fd;
259 } 263 }
260 #endif // defined(OS_POSIX) 264 #endif // defined(OS_POSIX)
261 265
OLDNEW
« no previous file with comments | « chrome/gpu/gpu_channel.h ('k') | chrome/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698