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