| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/hash.h" | 8 #include "base/hash.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 LOG(ERROR) << "Invalid image size for format."; | 1135 LOG(ERROR) << "Invalid image size for format."; |
| 1136 return; | 1136 return; |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 if (!gpu::ImageFactory::IsImageFormatCompatibleWithGpuMemoryBufferFormat( | 1139 if (!gpu::ImageFactory::IsImageFormatCompatibleWithGpuMemoryBufferFormat( |
| 1140 internalformat, format)) { | 1140 internalformat, format)) { |
| 1141 LOG(ERROR) << "Incompatible image format."; | 1141 LOG(ERROR) << "Incompatible image format."; |
| 1142 return; | 1142 return; |
| 1143 } | 1143 } |
| 1144 | 1144 |
| 1145 scoped_refptr<gfx::GLImage> image = channel()->CreateImageForGpuMemoryBuffer( | 1145 scoped_refptr<gl::GLImage> image = channel()->CreateImageForGpuMemoryBuffer( |
| 1146 handle, size, format, internalformat); | 1146 handle, size, format, internalformat); |
| 1147 if (!image.get()) | 1147 if (!image.get()) |
| 1148 return; | 1148 return; |
| 1149 | 1149 |
| 1150 image_manager->AddImage(image.get(), id); | 1150 image_manager->AddImage(image.get(), id); |
| 1151 } | 1151 } |
| 1152 | 1152 |
| 1153 void GpuCommandBufferStub::OnDestroyImage(int32 id) { | 1153 void GpuCommandBufferStub::OnDestroyImage(int32 id) { |
| 1154 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnDestroyImage"); | 1154 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnDestroyImage"); |
| 1155 | 1155 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 result)); | 1275 result)); |
| 1276 } | 1276 } |
| 1277 | 1277 |
| 1278 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, | 1278 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, |
| 1279 base::TimeDelta interval) { | 1279 base::TimeDelta interval) { |
| 1280 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, | 1280 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, |
| 1281 interval)); | 1281 interval)); |
| 1282 } | 1282 } |
| 1283 | 1283 |
| 1284 } // namespace content | 1284 } // namespace content |
| OLD | NEW |