OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |