Index: content/common/gpu/gpu_channel.cc |
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc |
index c79d20151fffb4c6f34bc9755f0bf04a250d9774..e081d4f39c54f16fe558fbfbc9ca6011ca7d27df 100644 |
--- a/content/common/gpu/gpu_channel.cc |
+++ b/content/common/gpu/gpu_channel.cc |
@@ -760,6 +760,8 @@ bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) { |
OnCreateCommandBuffer) |
IPC_MESSAGE_HANDLER(GpuChannelMsg_DestroyCommandBuffer, |
OnDestroyCommandBuffer) |
+ IPC_MESSAGE_HANDLER(GpuChannelMsg_GetDriverBugWorkArounds, |
palmer
2016/04/01 19:19:54
Do we need this in all builds, including productio
piman
2016/04/01 20:26:22
It needs to be in the binary for any configuration
|
+ OnGetDriverBugWorkArounds) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
return handled; |
@@ -978,6 +980,22 @@ void GpuChannel::OnDestroyCommandBuffer(int32_t route_id) { |
RemoveRoute(route_id); |
} |
+void GpuChannel::OnGetDriverBugWorkArounds( |
+ std::vector<std::string>* gpu_driver_bug_workarounds) { |
+ // TODO(j.isorce): Do the extraction of workarounds in GpuChannelManager's |
palmer
2016/04/01 19:19:54
Please attach a crbug.com link to all TODOs.
|
+ // constructor. Currently it is done in FeatureInfo constructor. There is no |
+ // need to extract them from the command-line every time a new FeatureInfo is |
+ // created (i.e. per ContextGroup) since parsing result is a constant. |
+ scoped_refptr<gpu::gles2::FeatureInfo> feature_info = |
+ new gpu::gles2::FeatureInfo; |
+ gpu_driver_bug_workarounds->clear(); |
+#define GPU_OP(type, name) \ |
+ if (feature_info->workarounds().name) \ |
+ gpu_driver_bug_workarounds->push_back(#name); |
+ GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) |
+#undef GPU_OP |
+} |
+ |
void GpuChannel::CacheShader(const std::string& key, |
const std::string& shader) { |
gpu_channel_manager_->delegate()->StoreShaderToDisk(client_id_, key, shader); |