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

Unified Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 11308332: Fix Graphics2D in NaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/proxy/ppb_instance_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_instance_proxy.cc
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index 603e34d9b1c06ae8ad8744f0da8233b2edfa05b3..3242a69f1d27df8cec3eadfeb2bbc2b42d5ab1d1 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -203,7 +203,6 @@ PP_Bool PPB_Instance_Proxy::BindGraphics(PP_Instance instance,
// all devices.
HostResource host_resource;
PP_Resource pp_resource = 0;
- PP_Bool result = PP_FALSE;
if (device) {
Resource* resource =
PpapiGlobals::Get()->GetResourceTracker()->GetResource(device);
@@ -214,8 +213,8 @@ PP_Bool PPB_Instance_Proxy::BindGraphics(PP_Instance instance,
} else {
// Passing 0 means unbinding all devices.
dispatcher()->Send(new PpapiHostMsg_PPBInstance_BindGraphics(
- API_ID_PPB_INSTANCE, instance, 0, &result));
- return result;
+ API_ID_PPB_INSTANCE, instance, 0));
+ return PP_TRUE;
}
// We need to pass different resource to Graphics 2D and 3D right now. Once
@@ -224,14 +223,14 @@ PP_Bool PPB_Instance_Proxy::BindGraphics(PP_Instance instance,
EnterResourceNoLock<PPB_Graphics3D_API> enter_3d(device, false);
if (enter_2d.succeeded()) {
dispatcher()->Send(new PpapiHostMsg_PPBInstance_BindGraphics(
- API_ID_PPB_INSTANCE, instance, pp_resource,
- &result));
+ API_ID_PPB_INSTANCE, instance, pp_resource));
+ return PP_TRUE;
} else if (enter_3d.succeeded()) {
dispatcher()->Send(new PpapiHostMsg_PPBInstance_BindGraphics(
- API_ID_PPB_INSTANCE, instance, host_resource.host_resource(),
- &result));
+ API_ID_PPB_INSTANCE, instance, host_resource.host_resource()));
+ return PP_TRUE;
}
- return result;
+ return PP_FALSE;
}
PP_Bool PPB_Instance_Proxy::IsFullFrame(PP_Instance instance) {
@@ -810,12 +809,10 @@ void PPB_Instance_Proxy::OnHostMsgGetOwnerElementObject(
}
void PPB_Instance_Proxy::OnHostMsgBindGraphics(PP_Instance instance,
- PP_Resource device,
- PP_Bool* result) {
+ PP_Resource device) {
EnterInstanceNoLock enter(instance);
- if (enter.succeeded()) {
- *result = enter.functions()->BindGraphics(instance, device);
- }
+ if (enter.succeeded())
+ enter.functions()->BindGraphics(instance, device);
bbudge 2012/12/03 21:16:54 Maybe a comment that we're discarding the return v
}
void PPB_Instance_Proxy::OnHostMsgGetAudioHardwareOutputSampleRate(
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698