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

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

Issue 2148983002: gpu: Take surface handle into account when importing buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gl_unittests 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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 if (!image_factory_) { 762 if (!image_factory_) {
763 LOG(ERROR) << "Image factory missing but required by buffer type."; 763 LOG(ERROR) << "Image factory missing but required by buffer type.";
764 return; 764 return;
765 } 765 }
766 766
767 // Note: this assumes that client ID is always 0. 767 // Note: this assumes that client ID is always 0.
768 const int kClientId = 0; 768 const int kClientId = 0;
769 769
770 scoped_refptr<gl::GLImage> image = 770 scoped_refptr<gl::GLImage> image =
771 image_factory_->CreateImageForGpuMemoryBuffer( 771 image_factory_->CreateImageForGpuMemoryBuffer(
772 handle, size, format, internalformat, kClientId); 772 handle, size, format, internalformat, kClientId,
773 kNullSurfaceHandle);
773 if (!image.get()) { 774 if (!image.get()) {
774 LOG(ERROR) << "Failed to create image for buffer."; 775 LOG(ERROR) << "Failed to create image for buffer.";
775 return; 776 return;
776 } 777 }
777 778
778 image_manager->AddImage(image.get(), id); 779 image_manager->AddImage(image.get(), id);
779 break; 780 break;
780 } 781 }
781 } 782 }
782 783
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 framebuffer_completeness_cache_ = 1055 framebuffer_completeness_cache_ =
1055 new gpu::gles2::FramebufferCompletenessCache; 1056 new gpu::gles2::FramebufferCompletenessCache;
1056 return framebuffer_completeness_cache_; 1057 return framebuffer_completeness_cache_;
1057 } 1058 }
1058 1059
1059 SyncPointManager* GpuInProcessThread::sync_point_manager() { 1060 SyncPointManager* GpuInProcessThread::sync_point_manager() {
1060 return sync_point_manager_; 1061 return sync_point_manager_;
1061 } 1062 }
1062 1063
1063 } // namespace gpu 1064 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698