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

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

Issue 10795037: Revert 147328 - Current status of patch: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_channel_manager.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) 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
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 scoped_refptr<gpu::RefCountedCounter> unprocessed_messages_; 140 scoped_refptr<gpu::RefCountedCounter> unprocessed_messages_;
141 }; 141 };
142 142
143 } // anonymous namespace 143 } // anonymous namespace
144 144
145 GpuChannel::GpuChannel(GpuChannelManager* gpu_channel_manager, 145 GpuChannel::GpuChannel(GpuChannelManager* gpu_channel_manager,
146 GpuWatchdog* watchdog, 146 GpuWatchdog* watchdog,
147 gfx::GLShareGroup* share_group, 147 gfx::GLShareGroup* share_group,
148 gpu::gles2::MailboxManager* mailbox, 148 gpu::gles2::MailboxManager* mailbox,
149 int client_id, 149 int client_id,
150 bool software, 150 bool software)
151 gpu::gles2::ProgramCache* program_cache)
152 : gpu_channel_manager_(gpu_channel_manager), 151 : gpu_channel_manager_(gpu_channel_manager),
153 program_cache_(program_cache),
154 unprocessed_messages_(new gpu::RefCountedCounter), 152 unprocessed_messages_(new gpu::RefCountedCounter),
155 client_id_(client_id), 153 client_id_(client_id),
156 share_group_(share_group ? share_group : new gfx::GLShareGroup), 154 share_group_(share_group ? share_group : new gfx::GLShareGroup),
157 mailbox_manager_(mailbox ? mailbox : new gpu::gles2::MailboxManager), 155 mailbox_manager_(mailbox ? mailbox : new gpu::gles2::MailboxManager),
158 watchdog_(watchdog), 156 watchdog_(watchdog),
159 software_(software), 157 software_(software),
160 handle_messages_scheduled_(false), 158 handle_messages_scheduled_(false),
161 processed_get_state_fast_(false), 159 processed_get_state_fast_(false),
162 weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 160 weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
163 DCHECK(gpu_channel_manager); 161 DCHECK(gpu_channel_manager);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 mailbox_manager_, 325 mailbox_manager_,
328 gfx::Size(), 326 gfx::Size(),
329 disallowed_features_, 327 disallowed_features_,
330 init_params.allowed_extensions, 328 init_params.allowed_extensions,
331 init_params.attribs, 329 init_params.attribs,
332 init_params.gpu_preference, 330 init_params.gpu_preference,
333 *route_id, 331 *route_id,
334 surface_id, 332 surface_id,
335 watchdog_, 333 watchdog_,
336 software_, 334 software_,
337 init_params.active_url, 335 init_params.active_url));
338 program_cache_));
339 if (preempt_by_counter_.get()) 336 if (preempt_by_counter_.get())
340 stub->SetPreemptByCounter(preempt_by_counter_); 337 stub->SetPreemptByCounter(preempt_by_counter_);
341 router_.AddRoute(*route_id, stub.get()); 338 router_.AddRoute(*route_id, stub.get());
342 stubs_.AddWithID(stub.release(), *route_id); 339 stubs_.AddWithID(stub.release(), *route_id);
343 #endif // ENABLE_GPU 340 #endif // ENABLE_GPU
344 } 341 }
345 342
346 GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32 route_id) { 343 GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32 route_id) {
347 return stubs_.Lookup(route_id); 344 return stubs_.Lookup(route_id);
348 } 345 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 gfx::GLSurfaceHandle(), 476 gfx::GLSurfaceHandle(),
480 mailbox_manager_.get(), 477 mailbox_manager_.get(),
481 size, 478 size,
482 disallowed_features_, 479 disallowed_features_,
483 init_params.allowed_extensions, 480 init_params.allowed_extensions,
484 init_params.attribs, 481 init_params.attribs,
485 init_params.gpu_preference, 482 init_params.gpu_preference,
486 route_id, 483 route_id,
487 0, watchdog_, 484 0, watchdog_,
488 software_, 485 software_,
489 init_params.active_url, 486 init_params.active_url));
490 program_cache_));
491 if (preempt_by_counter_.get()) 487 if (preempt_by_counter_.get())
492 stub->SetPreemptByCounter(preempt_by_counter_); 488 stub->SetPreemptByCounter(preempt_by_counter_);
493 router_.AddRoute(route_id, stub.get()); 489 router_.AddRoute(route_id, stub.get());
494 stubs_.AddWithID(stub.release(), route_id); 490 stubs_.AddWithID(stub.release(), route_id);
495 TRACE_EVENT1("gpu", "GpuChannel::OnCreateOffscreenCommandBuffer", 491 TRACE_EVENT1("gpu", "GpuChannel::OnCreateOffscreenCommandBuffer",
496 "route_id", route_id); 492 "route_id", route_id);
497 #endif 493 #endif
498 494
499 GpuChannelMsg_CreateOffscreenCommandBuffer::WriteReplyParams( 495 GpuChannelMsg_CreateOffscreenCommandBuffer::WriteReplyParams(
500 reply_message, 496 reply_message,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 } 530 }
535 531
536 void GpuChannel::OnEstablishStreamTexture( 532 void GpuChannel::OnEstablishStreamTexture(
537 int32 stream_id, content::SurfaceTexturePeer::SurfaceTextureTarget type, 533 int32 stream_id, content::SurfaceTexturePeer::SurfaceTextureTarget type,
538 int32 primary_id, int32 secondary_id) { 534 int32 primary_id, int32 secondary_id) {
539 stream_texture_manager_->EstablishStreamTexture( 535 stream_texture_manager_->EstablishStreamTexture(
540 stream_id, type, primary_id, secondary_id); 536 stream_id, type, primary_id, secondary_id);
541 } 537 }
542 #endif 538 #endif
543 539
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698