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

Side by Side Diff: gpu/ipc/service/gpu_channel.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: Rebase 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
« no previous file with comments | « gpu/ipc/service/BUILD.gn ('k') | gpu/ipc/service/gpu_channel_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "gpu/ipc/service/gpu_channel.h" 5 #include "gpu/ipc/service/gpu_channel.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 if (stub && !stub->IsScheduled()) { 989 if (stub && !stub->IsScheduled()) {
990 // This stub won't get a chance to reschedule the stream so do that now. 990 // This stub won't get a chance to reschedule the stream so do that now.
991 OnStreamRescheduled(stub->stream_id(), true); 991 OnStreamRescheduled(stub->stream_id(), true);
992 } 992 }
993 993
994 RemoveRoute(route_id); 994 RemoveRoute(route_id);
995 } 995 }
996 996
997 void GpuChannel::OnGetDriverBugWorkArounds( 997 void GpuChannel::OnGetDriverBugWorkArounds(
998 std::vector<std::string>* gpu_driver_bug_workarounds) { 998 std::vector<std::string>* gpu_driver_bug_workarounds) {
999 // TODO(j.isorce): http://crbug.com/599964 Do the extraction of workarounds in
1000 // the GpuChannelManager constructor. Currently it is done in the FeatureInfo
1001 // constructor. There is no need to extract them from the command-line every
1002 // time a new FeatureInfo is created (i.e. per ContextGroup) since parsing
1003 // result is a constant.
1004 scoped_refptr<gpu::gles2::FeatureInfo> feature_info =
1005 new gpu::gles2::FeatureInfo;
1006 gpu_driver_bug_workarounds->clear(); 999 gpu_driver_bug_workarounds->clear();
1007 #define GPU_OP(type, name) \ 1000 #define GPU_OP(type, name) \
1008 if (feature_info->workarounds().name) \ 1001 if (gpu_channel_manager_->gpu_driver_bug_workarounds().name) \
1009 gpu_driver_bug_workarounds->push_back(#name); 1002 gpu_driver_bug_workarounds->push_back(#name);
1010 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) 1003 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
1011 #undef GPU_OP 1004 #undef GPU_OP
1012 } 1005 }
1013 1006
1014 void GpuChannel::CacheShader(const std::string& key, 1007 void GpuChannel::CacheShader(const std::string& key,
1015 const std::string& shader) { 1008 const std::string& shader) {
1016 gpu_channel_manager_->delegate()->StoreShaderToDisk(client_id_, key, shader); 1009 gpu_channel_manager_->delegate()->StoreShaderToDisk(client_id_, key, shader);
1017 } 1010 }
1018 1011
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 } 1070 }
1078 } 1071 }
1079 } 1072 }
1080 1073
1081 void GpuChannel::HandleUpdateValueState( 1074 void GpuChannel::HandleUpdateValueState(
1082 unsigned int target, const ValueState& state) { 1075 unsigned int target, const ValueState& state) {
1083 pending_valuebuffer_state_->UpdateState(target, state); 1076 pending_valuebuffer_state_->UpdateState(target, state);
1084 } 1077 }
1085 1078
1086 } // namespace gpu 1079 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/BUILD.gn ('k') | gpu/ipc/service/gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698