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

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

Issue 1354483004: Re-land: ui: Add GLImage unit test framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another build fix Created 5 years, 3 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
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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698