| Index: ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc
|
| ===================================================================
|
| --- ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc (revision 99381)
|
| +++ ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc (working copy)
|
| @@ -18,6 +18,7 @@
|
| #include "ppapi/c/dev/ppb_graphics_3d_dev.h"
|
| #include "ppapi/c/dev/ppb_graphics_3d_trusted_dev.h"
|
| #include "ppapi/c/pp_errors.h"
|
| +#include "ppapi/c/private/ppb_gpu_blacklist_private.h"
|
| #include "srpcgen/ppb_rpc.h"
|
|
|
| using ppapi_proxy::DebugPrintf;
|
| @@ -75,6 +76,13 @@
|
| return true;
|
| }
|
|
|
| +bool IsGpuBlacklisted() {
|
| + static const PPB_GpuBlacklist_Private* interface =
|
| + static_cast<const PPB_GpuBlacklist_Private*>(
|
| + ppapi_proxy::GetBrowserInterfaceSafe(PPB_GPU_BLACKLIST_INTERFACE));
|
| + return interface->IsGpuBlacklisted();
|
| +}
|
| +
|
| } // namespace
|
|
|
| //@{
|
| @@ -183,8 +191,12 @@
|
| attrib_list = NULL;
|
| if (!ValidateAttribList(attrib_list_size, attrib_list))
|
| return;
|
| - *resource_id = ppapi_proxy::PPBGraphics3DTrustedInterface()->CreateRaw(
|
| - instance, share_context, attrib_list);
|
| + if (IsGpuBlacklisted()) {
|
| + *resource_id = ppapi_proxy::kInvalidResourceId;
|
| + } else {
|
| + *resource_id = ppapi_proxy::PPBGraphics3DTrustedInterface()->CreateRaw(
|
| + instance, share_context, attrib_list);
|
| + }
|
| rpc->result = NACL_SRPC_RESULT_OK;
|
| }
|
|
|
|
|