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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 DCHECK(image_manager); | 706 DCHECK(image_manager); |
707 if (image_manager->LookupImage(id)) { | 707 if (image_manager->LookupImage(id)) { |
708 LOG(ERROR) << "Image already exists with same ID."; | 708 LOG(ERROR) << "Image already exists with same ID."; |
709 return; | 709 return; |
710 } | 710 } |
711 | 711 |
712 switch (handle.type) { | 712 switch (handle.type) { |
713 case gfx::SHARED_MEMORY_BUFFER: { | 713 case gfx::SHARED_MEMORY_BUFFER: { |
714 scoped_refptr<gfx::GLImageSharedMemory> image( | 714 scoped_refptr<gfx::GLImageSharedMemory> image( |
715 new gfx::GLImageSharedMemory(size, internalformat)); | 715 new gfx::GLImageSharedMemory(size, internalformat)); |
716 if (!image->Initialize(handle, format)) { | 716 if (!image->Initialize(handle.handle, handle.id, format)) { |
717 LOG(ERROR) << "Failed to initialize image."; | 717 LOG(ERROR) << "Failed to initialize image."; |
718 return; | 718 return; |
719 } | 719 } |
720 | 720 |
721 image_manager->AddImage(image.get(), id); | 721 image_manager->AddImage(image.get(), id); |
722 break; | 722 break; |
723 } | 723 } |
724 default: { | 724 default: { |
725 if (!image_factory_) { | 725 if (!image_factory_) { |
726 LOG(ERROR) << "Image factory missing but required by buffer type."; | 726 LOG(ERROR) << "Image factory missing but required by buffer type."; |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 framebuffer_completeness_cache_ = | 1074 framebuffer_completeness_cache_ = |
1075 new gpu::gles2::FramebufferCompletenessCache; | 1075 new gpu::gles2::FramebufferCompletenessCache; |
1076 return framebuffer_completeness_cache_; | 1076 return framebuffer_completeness_cache_; |
1077 } | 1077 } |
1078 | 1078 |
1079 SyncPointManager* GpuInProcessThread::sync_point_manager() { | 1079 SyncPointManager* GpuInProcessThread::sync_point_manager() { |
1080 return sync_point_manager_; | 1080 return sync_point_manager_; |
1081 } | 1081 } |
1082 | 1082 |
1083 } // namespace gpu | 1083 } // namespace gpu |
OLD | NEW |