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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 FastSetActiveURL(active_url_, active_url_hash_, channel_); | 203 FastSetActiveURL(active_url_, active_url_hash_, channel_); |
204 | 204 |
205 gles2::ContextCreationAttribHelper attrib_parser; | 205 gles2::ContextCreationAttribHelper attrib_parser; |
206 attrib_parser.Parse(requested_attribs_); | 206 attrib_parser.Parse(requested_attribs_); |
207 | 207 |
208 if (share_group) { | 208 if (share_group) { |
209 context_group_ = share_group->context_group_; | 209 context_group_ = share_group->context_group_; |
210 DCHECK(context_group_->bind_generates_resource() == | 210 DCHECK(context_group_->bind_generates_resource() == |
211 attrib_parser.bind_generates_resource); | 211 attrib_parser.bind_generates_resource); |
212 } else { | 212 } else { |
| 213 scoped_refptr<gles2::FeatureInfo> feature_info = new gles2::FeatureInfo( |
| 214 channel_->gpu_channel_manager()->gpu_driver_bug_workarounds()); |
213 context_group_ = new gles2::ContextGroup( | 215 context_group_ = new gles2::ContextGroup( |
214 channel_->gpu_channel_manager()->gpu_preferences(), mailbox_manager, | 216 channel_->gpu_channel_manager()->gpu_preferences(), mailbox_manager, |
215 new GpuCommandBufferMemoryTracker(channel, | 217 new GpuCommandBufferMemoryTracker(channel, |
216 command_buffer_id_.GetUnsafeValue()), | 218 command_buffer_id_.GetUnsafeValue()), |
217 channel_->gpu_channel_manager()->shader_translator_cache(), | 219 channel_->gpu_channel_manager()->shader_translator_cache(), |
218 channel_->gpu_channel_manager()->framebuffer_completeness_cache(), NULL, | 220 channel_->gpu_channel_manager()->framebuffer_completeness_cache(), |
219 subscription_ref_set, pending_valuebuffer_state, | 221 feature_info, subscription_ref_set, pending_valuebuffer_state, |
220 attrib_parser.bind_generates_resource); | 222 attrib_parser.bind_generates_resource); |
221 } | 223 } |
222 | 224 |
223 // Virtualize PreferIntegratedGpu contexts by default on OS X to prevent | 225 // Virtualize PreferIntegratedGpu contexts by default on OS X to prevent |
224 // performance regressions when enabling FCM. | 226 // performance regressions when enabling FCM. |
225 // http://crbug.com/180463 | 227 // http://crbug.com/180463 |
226 #if defined(OS_MACOSX) | 228 #if defined(OS_MACOSX) |
227 if (gpu_preference_ == gfx::PreferIntegratedGpu) | 229 if (gpu_preference_ == gfx::PreferIntegratedGpu) |
228 use_virtualized_gl_context_ = true; | 230 use_virtualized_gl_context_ = true; |
229 #endif | 231 #endif |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 result)); | 1129 result)); |
1128 } | 1130 } |
1129 | 1131 |
1130 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, | 1132 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, |
1131 base::TimeDelta interval) { | 1133 base::TimeDelta interval) { |
1132 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, | 1134 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, |
1133 interval)); | 1135 interval)); |
1134 } | 1136 } |
1135 | 1137 |
1136 } // namespace gpu | 1138 } // namespace gpu |
OLD | NEW |