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 "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1259 success = sync_message_filter()->Send(message); | 1259 success = sync_message_filter()->Send(message); |
1260 | 1260 |
1261 if (!success) | 1261 if (!success) |
1262 return scoped_ptr<gfx::GpuMemoryBuffer>(); | 1262 return scoped_ptr<gfx::GpuMemoryBuffer>(); |
1263 | 1263 |
1264 return GpuMemoryBufferImpl::CreateFromHandle( | 1264 return GpuMemoryBufferImpl::CreateFromHandle( |
1265 handle, gfx::Size(width, height), internalformat) | 1265 handle, gfx::Size(width, height), internalformat) |
1266 .PassAs<gfx::GpuMemoryBuffer>(); | 1266 .PassAs<gfx::GpuMemoryBuffer>(); |
1267 } | 1267 } |
1268 | 1268 |
| 1269 void RenderThreadImpl::DeleteGpuMemoryBuffer( |
| 1270 scoped_ptr<gfx::GpuMemoryBuffer> buffer) { |
| 1271 gfx::GpuMemoryBufferHandle handle(buffer->GetHandle()); |
| 1272 |
| 1273 IPC::Message* message = new ChildProcessHostMsg_DeletedGpuMemoryBuffer( |
| 1274 handle.type, handle.global_id); |
| 1275 |
| 1276 // Allow calling this from the compositor thread. |
| 1277 thread_safe_sender()->Send(message); |
| 1278 } |
| 1279 |
1269 void RenderThreadImpl::DoNotSuspendWebKitSharedTimer() { | 1280 void RenderThreadImpl::DoNotSuspendWebKitSharedTimer() { |
1270 suspend_webkit_shared_timer_ = false; | 1281 suspend_webkit_shared_timer_ = false; |
1271 } | 1282 } |
1272 | 1283 |
1273 void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() { | 1284 void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() { |
1274 notify_webkit_of_modal_loop_ = false; | 1285 notify_webkit_of_modal_loop_ = false; |
1275 } | 1286 } |
1276 | 1287 |
1277 void RenderThreadImpl::OnSetZoomLevelForCurrentURL(const std::string& scheme, | 1288 void RenderThreadImpl::OnSetZoomLevelForCurrentURL(const std::string& scheme, |
1278 const std::string& host, | 1289 const std::string& host, |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1596 hidden_widget_count_--; | 1607 hidden_widget_count_--; |
1597 | 1608 |
1598 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1609 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1599 return; | 1610 return; |
1600 } | 1611 } |
1601 | 1612 |
1602 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1613 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1603 } | 1614 } |
1604 | 1615 |
1605 } // namespace content | 1616 } // namespace content |
OLD | NEW |