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

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: rebase 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
« no previous file with comments | « content/common/gpu/media/vt_video_decode_accelerator.cc ('k') | ui/gl/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/media/vt_video_decode_accelerator.cc ('k') | ui/gl/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698