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

Side by Side Diff: gpu/ipc/service/gpu_command_buffer_stub.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: avoid crash in DrmDeviceManager::GetDrmDevice when passed invalid widget 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
« no previous file with comments | « gpu/ipc/service/gpu_channel.cc ('k') | gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ipc/service/gpu_command_buffer_stub.h" 5 #include "gpu/ipc/service/gpu_command_buffer_stub.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 return; 998 return;
999 } 999 }
1000 1000
1001 if (!gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat(internalformat, 1001 if (!gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat(internalformat,
1002 format)) { 1002 format)) {
1003 LOG(ERROR) << "Incompatible image format."; 1003 LOG(ERROR) << "Incompatible image format.";
1004 return; 1004 return;
1005 } 1005 }
1006 1006
1007 scoped_refptr<gl::GLImage> image = channel()->CreateImageForGpuMemoryBuffer( 1007 scoped_refptr<gl::GLImage> image = channel()->CreateImageForGpuMemoryBuffer(
1008 handle, size, format, internalformat); 1008 handle, size, format, internalformat, surface_handle_);
1009 if (!image.get()) 1009 if (!image.get())
1010 return; 1010 return;
1011 1011
1012 image_manager->AddImage(image.get(), id); 1012 image_manager->AddImage(image.get(), id);
1013 if (image_release_count) { 1013 if (image_release_count) {
1014 DLOG_IF(ERROR, 1014 DLOG_IF(ERROR,
1015 image_release_count != 1015 image_release_count !=
1016 sync_point_client_->client_state()->fence_sync_release() + 1) 1016 sync_point_client_->client_state()->fence_sync_release() + 1)
1017 << "Client released fences out of order."; 1017 << "Client released fences out of order.";
1018 sync_point_client_->ReleaseFenceSync(image_release_count); 1018 sync_point_client_->ReleaseFenceSync(image_release_count);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, params)); 1113 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, params));
1114 } 1114 }
1115 1115
1116 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, 1116 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase,
1117 base::TimeDelta interval) { 1117 base::TimeDelta interval) {
1118 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, 1118 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase,
1119 interval)); 1119 interval));
1120 } 1120 }
1121 1121
1122 } // namespace gpu 1122 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_channel.cc ('k') | gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698