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

Side by Side Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 205193006: gpu: Remove map_image field from gpu::Capabilities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move TODO Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "gpu/command_buffer/service/in_process_command_buffer.h" 5 #include "gpu/command_buffer/service/in_process_command_buffer.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 params.attribs)) { 395 params.attribs)) {
396 LOG(ERROR) << "Could not initialize decoder."; 396 LOG(ERROR) << "Could not initialize decoder.";
397 DestroyOnGpuThread(); 397 DestroyOnGpuThread();
398 return false; 398 return false;
399 } 399 }
400 400
401 gpu_control_.reset( 401 gpu_control_.reset(
402 new GpuControlService(decoder_->GetContextGroup()->image_manager(), 402 new GpuControlService(decoder_->GetContextGroup()->image_manager(),
403 g_gpu_memory_buffer_factory, 403 g_gpu_memory_buffer_factory,
404 decoder_->GetContextGroup()->mailbox_manager(), 404 decoder_->GetContextGroup()->mailbox_manager(),
405 decoder_->GetQueryManager(), 405 decoder_->GetQueryManager()));
406 decoder_->GetCapabilities()));
407 406
408 *params.capabilities = gpu_control_->GetCapabilities(); 407 *params.capabilities = decoder_->GetCapabilities();
409 408
410 if (!params.is_offscreen) { 409 if (!params.is_offscreen) {
411 decoder_->SetResizeCallback(base::Bind( 410 decoder_->SetResizeCallback(base::Bind(
412 &InProcessCommandBuffer::OnResizeView, gpu_thread_weak_ptr_)); 411 &InProcessCommandBuffer::OnResizeView, gpu_thread_weak_ptr_));
413 } 412 }
414 decoder_->SetWaitSyncPointCallback(base::Bind(&WaitSyncPoint)); 413 decoder_->SetWaitSyncPointCallback(base::Bind(&WaitSyncPoint));
415 414
416 return true; 415 return true;
417 } 416 }
418 417
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 id); 583 id);
585 584
586 QueueTask(task); 585 QueueTask(task);
587 } 586 }
588 587
589 gpu::Buffer InProcessCommandBuffer::GetTransferBuffer(int32 id) { 588 gpu::Buffer InProcessCommandBuffer::GetTransferBuffer(int32 id) {
590 NOTREACHED(); 589 NOTREACHED();
591 return gpu::Buffer(); 590 return gpu::Buffer();
592 } 591 }
593 592
594 gpu::Capabilities InProcessCommandBuffer::GetCapabilities() {
595 return capabilities_;
596 }
597
598 gfx::GpuMemoryBuffer* InProcessCommandBuffer::CreateGpuMemoryBuffer( 593 gfx::GpuMemoryBuffer* InProcessCommandBuffer::CreateGpuMemoryBuffer(
599 size_t width, 594 size_t width,
600 size_t height, 595 size_t height,
601 unsigned internalformat, 596 unsigned internalformat,
602 int32* id) { 597 int32* id) {
603 CheckSequencedThread(); 598 CheckSequencedThread();
604 base::AutoLock lock(command_buffer_lock_); 599 base::AutoLock lock(command_buffer_lock_);
605 return gpu_control_->CreateGpuMemoryBuffer(width, 600 return gpu_control_->CreateGpuMemoryBuffer(width,
606 height, 601 height,
607 internalformat, 602 internalformat,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 } 755 }
761 #endif 756 #endif
762 757
763 // static 758 // static
764 void InProcessCommandBuffer::SetGpuMemoryBufferFactory( 759 void InProcessCommandBuffer::SetGpuMemoryBufferFactory(
765 GpuMemoryBufferFactory* factory) { 760 GpuMemoryBufferFactory* factory) {
766 g_gpu_memory_buffer_factory = factory; 761 g_gpu_memory_buffer_factory = factory;
767 } 762 }
768 763
769 } // namespace gpu 764 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698