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

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

Issue 2178563002: gpu: Take surface handle into account when importing buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 if (!image_factory_) { 765 if (!image_factory_) {
766 LOG(ERROR) << "Image factory missing but required by buffer type."; 766 LOG(ERROR) << "Image factory missing but required by buffer type.";
767 return; 767 return;
768 } 768 }
769 769
770 // Note: this assumes that client ID is always 0. 770 // Note: this assumes that client ID is always 0.
771 const int kClientId = 0; 771 const int kClientId = 0;
772 772
773 scoped_refptr<gl::GLImage> image = 773 scoped_refptr<gl::GLImage> image =
774 image_factory_->CreateImageForGpuMemoryBuffer( 774 image_factory_->CreateImageForGpuMemoryBuffer(
775 handle, size, format, internalformat, kClientId); 775 handle, size, format, internalformat, kClientId,
776 kNullSurfaceHandle);
776 if (!image.get()) { 777 if (!image.get()) {
777 LOG(ERROR) << "Failed to create image for buffer."; 778 LOG(ERROR) << "Failed to create image for buffer.";
778 return; 779 return;
779 } 780 }
780 781
781 image_manager->AddImage(image.get(), id); 782 image_manager->AddImage(image.get(), id);
782 break; 783 break;
783 } 784 }
784 } 785 }
785 786
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 framebuffer_completeness_cache_ = 1070 framebuffer_completeness_cache_ =
1070 new gpu::gles2::FramebufferCompletenessCache; 1071 new gpu::gles2::FramebufferCompletenessCache;
1071 return framebuffer_completeness_cache_; 1072 return framebuffer_completeness_cache_;
1072 } 1073 }
1073 1074
1074 SyncPointManager* GpuInProcessThread::sync_point_manager() { 1075 SyncPointManager* GpuInProcessThread::sync_point_manager() {
1075 return sync_point_manager_; 1076 return sync_point_manager_;
1076 } 1077 }
1077 1078
1078 } // namespace gpu 1079 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/image_factory.h ('k') | gpu/command_buffer/tests/texture_image_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698