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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 FastSetActiveURL(active_url_, active_url_hash_); | 129 FastSetActiveURL(active_url_, active_url_hash_); |
130 if (share_group) { | 130 if (share_group) { |
131 context_group_ = share_group->context_group_; | 131 context_group_ = share_group->context_group_; |
132 } else { | 132 } else { |
133 context_group_ = new gpu::gles2::ContextGroup( | 133 context_group_ = new gpu::gles2::ContextGroup( |
134 mailbox_manager, | 134 mailbox_manager, |
135 image_manager, | 135 image_manager, |
136 new GpuCommandBufferMemoryTracker(channel), | 136 new GpuCommandBufferMemoryTracker(channel), |
137 true); | 137 true); |
138 } | 138 } |
| 139 if (handle_.sync_point) |
| 140 OnWaitSyncPoint(handle_.sync_point); |
139 } | 141 } |
140 | 142 |
141 GpuCommandBufferStub::~GpuCommandBufferStub() { | 143 GpuCommandBufferStub::~GpuCommandBufferStub() { |
142 Destroy(); | 144 Destroy(); |
143 | 145 |
144 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); | 146 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); |
145 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(surface_id())); | 147 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(surface_id())); |
146 } | 148 } |
147 | 149 |
148 GpuMemoryManager* GpuCommandBufferStub::GetMemoryManager() { | 150 GpuMemoryManager* GpuCommandBufferStub::GetMemoryManager() { |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 // made current before calling methods on the surface. | 894 // made current before calling methods on the surface. |
893 if (!surface_ || !MakeCurrent()) | 895 if (!surface_ || !MakeCurrent()) |
894 return; | 896 return; |
895 surface_->SetFrontbufferAllocation( | 897 surface_->SetFrontbufferAllocation( |
896 allocation.browser_allocation.suggest_have_frontbuffer); | 898 allocation.browser_allocation.suggest_have_frontbuffer); |
897 } | 899 } |
898 | 900 |
899 } // namespace content | 901 } // namespace content |
900 | 902 |
901 #endif // defined(ENABLE_GPU) | 903 #endif // defined(ENABLE_GPU) |
OLD | NEW |