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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 FastSetActiveURL(active_url_, active_url_hash_); | 126 FastSetActiveURL(active_url_, active_url_hash_); |
127 if (share_group) { | 127 if (share_group) { |
128 context_group_ = share_group->context_group_; | 128 context_group_ = share_group->context_group_; |
129 } else { | 129 } else { |
130 context_group_ = new gpu::gles2::ContextGroup( | 130 context_group_ = new gpu::gles2::ContextGroup( |
131 mailbox_manager, | 131 mailbox_manager, |
132 image_manager, | 132 image_manager, |
133 new GpuCommandBufferMemoryTracker(channel), | 133 new GpuCommandBufferMemoryTracker(channel), |
134 true); | 134 true); |
135 } | 135 } |
136 if (handle_.sync_point) | |
137 OnWaitSyncPoint(handle_.sync_point); | |
138 } | 136 } |
139 | 137 |
140 GpuCommandBufferStub::~GpuCommandBufferStub() { | 138 GpuCommandBufferStub::~GpuCommandBufferStub() { |
141 Destroy(); | 139 Destroy(); |
142 | 140 |
143 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); | 141 GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); |
144 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(surface_id())); | 142 gpu_channel_manager->Send(new GpuHostMsg_DestroyCommandBuffer(surface_id())); |
145 } | 143 } |
146 | 144 |
147 GpuMemoryManager* GpuCommandBufferStub::GetMemoryManager() { | 145 GpuMemoryManager* GpuCommandBufferStub::GetMemoryManager() { |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 // made current before calling methods on the surface. | 840 // made current before calling methods on the surface. |
843 if (!surface_ || !MakeCurrent()) | 841 if (!surface_ || !MakeCurrent()) |
844 return; | 842 return; |
845 surface_->SetFrontbufferAllocation( | 843 surface_->SetFrontbufferAllocation( |
846 allocation.browser_allocation.suggest_have_frontbuffer); | 844 allocation.browser_allocation.suggest_have_frontbuffer); |
847 } | 845 } |
848 | 846 |
849 } // namespace content | 847 } // namespace content |
850 | 848 |
851 #endif // defined(ENABLE_GPU) | 849 #endif // defined(ENABLE_GPU) |
OLD | NEW |