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 "content/common/gpu/gpu_channel.h" | 5 #include "content/common/gpu/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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 if (stub && !stub->IsScheduled()) { | 975 if (stub && !stub->IsScheduled()) { |
976 // This stub won't get a chance to reschedule the stream so do that now. | 976 // This stub won't get a chance to reschedule the stream so do that now. |
977 OnStreamRescheduled(stub->stream_id(), true); | 977 OnStreamRescheduled(stub->stream_id(), true); |
978 } | 978 } |
979 | 979 |
980 RemoveRoute(route_id); | 980 RemoveRoute(route_id); |
981 } | 981 } |
982 | 982 |
983 void GpuChannel::OnGetDriverBugWorkArounds( | 983 void GpuChannel::OnGetDriverBugWorkArounds( |
984 std::vector<std::string>* gpu_driver_bug_workarounds) { | 984 std::vector<std::string>* gpu_driver_bug_workarounds) { |
985 // TODO(j.isorce): http://crbug.com/599964 Do the extraction of workarounds in | |
986 // the GpuChannelManager constructor. Currently it is done in the FeatureInfo | |
987 // constructor. There is no need to extract them from the command-line every | |
988 // time a new FeatureInfo is created (i.e. per ContextGroup) since parsing | |
989 // result is a constant. | |
990 scoped_refptr<gpu::gles2::FeatureInfo> feature_info = | |
991 new gpu::gles2::FeatureInfo; | |
992 gpu_driver_bug_workarounds->clear(); | 985 gpu_driver_bug_workarounds->clear(); |
993 #define GPU_OP(type, name) \ | 986 #define GPU_OP(type, name) \ |
994 if (feature_info->workarounds().name) \ | 987 if (gpu_channel_manager_->gpu_driver_bug_workarounds().name) \ |
995 gpu_driver_bug_workarounds->push_back(#name); | 988 gpu_driver_bug_workarounds->push_back(#name); |
996 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) | 989 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) |
997 #undef GPU_OP | 990 #undef GPU_OP |
998 } | 991 } |
999 | 992 |
1000 void GpuChannel::CacheShader(const std::string& key, | 993 void GpuChannel::CacheShader(const std::string& key, |
1001 const std::string& shader) { | 994 const std::string& shader) { |
1002 gpu_channel_manager_->delegate()->StoreShaderToDisk(client_id_, key, shader); | 995 gpu_channel_manager_->delegate()->StoreShaderToDisk(client_id_, key, shader); |
1003 } | 996 } |
1004 | 997 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 } | 1056 } |
1064 } | 1057 } |
1065 } | 1058 } |
1066 | 1059 |
1067 void GpuChannel::HandleUpdateValueState( | 1060 void GpuChannel::HandleUpdateValueState( |
1068 unsigned int target, const gpu::ValueState& state) { | 1061 unsigned int target, const gpu::ValueState& state) { |
1069 pending_valuebuffer_state_->UpdateState(target, state); | 1062 pending_valuebuffer_state_->UpdateState(target, state); |
1070 } | 1063 } |
1071 | 1064 |
1072 } // namespace content | 1065 } // namespace content |
OLD | NEW |