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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 DCHECK(image_manager); | 692 DCHECK(image_manager); |
693 if (image_manager->LookupImage(id)) { | 693 if (image_manager->LookupImage(id)) { |
694 LOG(ERROR) << "Image already exists with same ID."; | 694 LOG(ERROR) << "Image already exists with same ID."; |
695 return; | 695 return; |
696 } | 696 } |
697 | 697 |
698 switch (handle.type) { | 698 switch (handle.type) { |
699 case gfx::SHARED_MEMORY_BUFFER: { | 699 case gfx::SHARED_MEMORY_BUFFER: { |
700 scoped_refptr<gfx::GLImageSharedMemory> image( | 700 scoped_refptr<gfx::GLImageSharedMemory> image( |
701 new gfx::GLImageSharedMemory(size, internalformat)); | 701 new gfx::GLImageSharedMemory(size, internalformat)); |
702 if (!image->Initialize(handle.handle, handle.id, format)) { | 702 if (!image->Initialize(handle, format)) { |
703 LOG(ERROR) << "Failed to initialize image."; | 703 LOG(ERROR) << "Failed to initialize image."; |
704 return; | 704 return; |
705 } | 705 } |
706 | 706 |
707 image_manager->AddImage(image.get(), id); | 707 image_manager->AddImage(image.get(), id); |
708 break; | 708 break; |
709 } | 709 } |
710 default: { | 710 default: { |
711 if (!image_factory_) { | 711 if (!image_factory_) { |
712 LOG(ERROR) << "Image factory missing but required by buffer type."; | 712 LOG(ERROR) << "Image factory missing but required by buffer type."; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 framebuffer_completeness_cache_ = | 988 framebuffer_completeness_cache_ = |
989 new gpu::gles2::FramebufferCompletenessCache; | 989 new gpu::gles2::FramebufferCompletenessCache; |
990 return framebuffer_completeness_cache_; | 990 return framebuffer_completeness_cache_; |
991 } | 991 } |
992 | 992 |
993 SyncPointManager* GpuInProcessThread::sync_point_manager() { | 993 SyncPointManager* GpuInProcessThread::sync_point_manager() { |
994 return sync_point_manager_; | 994 return sync_point_manager_; |
995 } | 995 } |
996 | 996 |
997 } // namespace gpu | 997 } // namespace gpu |
OLD | NEW |