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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_graphics_3d_rpc_server.cc

Issue 7790016: Hookup Gpu blacklist with NaCl Pepper3D access. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/c/private/ppb_gpu_blacklist_private.h ('k') | ppapi/ppapi_cpp.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « ppapi/c/private/ppb_gpu_blacklist_private.h ('k') | ppapi/ppapi_cpp.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698