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

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

Powered by Google App Engine
This is Rietveld 408576698