Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1543)

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 1871613002: Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/common/gpu/gpu_command_buffer_stub.h" 5 #include "content/common/gpu/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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 gpu::gles2::ContextCreationAttribHelper attrib_parser; 205 gpu::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 context_group_ = new gpu::gles2::ContextGroup( 213 context_group_ = new gpu::gles2::ContextGroup(
214 channel_->gpu_channel_manager()->gpu_preferences(), mailbox_manager, 214 channel_->gpu_channel_manager()->gpu_preferences(),
215 new GpuCommandBufferMemoryTracker(channel, 215 channel_->gpu_channel_manager()->gpu_driver_bug_workarounds(),
216 command_buffer_id_.GetUnsafeValue()), 216 mailbox_manager, new GpuCommandBufferMemoryTracker(
217 channel, command_buffer_id_.GetUnsafeValue()),
217 channel_->gpu_channel_manager()->shader_translator_cache(), 218 channel_->gpu_channel_manager()->shader_translator_cache(),
218 channel_->gpu_channel_manager()->framebuffer_completeness_cache(), NULL, 219 channel_->gpu_channel_manager()->framebuffer_completeness_cache(), NULL,
219 subscription_ref_set, pending_valuebuffer_state, 220 subscription_ref_set, pending_valuebuffer_state,
220 attrib_parser.bind_generates_resource); 221 attrib_parser.bind_generates_resource);
221 } 222 }
222 223
223 // Virtualize PreferIntegratedGpu contexts by default on OS X to prevent 224 // Virtualize PreferIntegratedGpu contexts by default on OS X to prevent
224 // performance regressions when enabling FCM. 225 // performance regressions when enabling FCM.
225 // http://crbug.com/180463 226 // http://crbug.com/180463
226 #if defined(OS_MACOSX) 227 #if defined(OS_MACOSX)
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 result)); 1134 result));
1134 } 1135 }
1135 1136
1136 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, 1137 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase,
1137 base::TimeDelta interval) { 1138 base::TimeDelta interval) {
1138 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, 1139 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase,
1139 interval)); 1140 interval));
1140 } 1141 }
1141 1142
1142 } // namespace content 1143 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698