OLD | NEW |
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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 DCHECK(image_manager); | 671 DCHECK(image_manager); |
672 if (image_manager->LookupImage(id)) { | 672 if (image_manager->LookupImage(id)) { |
673 LOG(ERROR) << "Image already exists with same ID."; | 673 LOG(ERROR) << "Image already exists with same ID."; |
674 return; | 674 return; |
675 } | 675 } |
676 | 676 |
677 switch (handle.type) { | 677 switch (handle.type) { |
678 case gfx::SHARED_MEMORY_BUFFER: { | 678 case gfx::SHARED_MEMORY_BUFFER: { |
679 scoped_refptr<gfx::GLImageSharedMemory> image( | 679 scoped_refptr<gfx::GLImageSharedMemory> image( |
680 new gfx::GLImageSharedMemory(size, internalformat)); | 680 new gfx::GLImageSharedMemory(size, internalformat)); |
681 if (!image->Initialize(handle, format)) { | 681 if (!image->Initialize(handle.handle, handle.id, format)) { |
682 LOG(ERROR) << "Failed to initialize image."; | 682 LOG(ERROR) << "Failed to initialize image."; |
683 return; | 683 return; |
684 } | 684 } |
685 | 685 |
686 image_manager->AddImage(image.get(), id); | 686 image_manager->AddImage(image.get(), id); |
687 break; | 687 break; |
688 } | 688 } |
689 default: { | 689 default: { |
690 if (!image_factory_) { | 690 if (!image_factory_) { |
691 LOG(ERROR) << "Image factory missing but required by buffer type."; | 691 LOG(ERROR) << "Image factory missing but required by buffer type."; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 framebuffer_completeness_cache_ = | 967 framebuffer_completeness_cache_ = |
968 new gpu::gles2::FramebufferCompletenessCache; | 968 new gpu::gles2::FramebufferCompletenessCache; |
969 return framebuffer_completeness_cache_; | 969 return framebuffer_completeness_cache_; |
970 } | 970 } |
971 | 971 |
972 SyncPointManager* GpuInProcessThread::sync_point_manager() { | 972 SyncPointManager* GpuInProcessThread::sync_point_manager() { |
973 return sync_point_manager_; | 973 return sync_point_manager_; |
974 } | 974 } |
975 | 975 |
976 } // namespace gpu | 976 } // namespace gpu |
OLD | NEW |