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

Unified Diff: ppapi/examples/2d/graphics_2d_example.c

Issue 6222003: Fix ppapi_example_2d. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/2d/graphics_2d_example.c
diff --git a/ppapi/examples/2d/graphics_2d_example.c b/ppapi/examples/2d/graphics_2d_example.c
index 4e2fcd76b7dd6a2a3cfb615bb5a88694d1cd08ff..d17f99a79e17bfb209d6689a16015c02efdcf87f 100644
--- a/ppapi/examples/2d/graphics_2d_example.c
+++ b/ppapi/examples/2d/graphics_2d_example.c
@@ -19,7 +19,6 @@
#include "ppapi/c/ppp.h"
#include "ppapi/c/ppp_instance.h"
-PP_Module g_module_id;
PPB_GetInterface g_get_browser_interface = NULL;
const struct PPB_Core* g_core_interface;
@@ -44,7 +43,7 @@ PP_Resource MakeAndBindDeviceContext(PP_Instance instance,
const struct PP_Size* size) {
PP_Resource device_context;
- device_context = g_graphics_2d_interface->Create(g_module_id, size, PP_FALSE);
+ device_context = g_graphics_2d_interface->Create(instance, size, PP_FALSE);
if (!device_context)
return 0;
@@ -67,7 +66,7 @@ void Repaint(struct InstanceInfo* instance, const struct PP_Size* size) {
/* Create image data to paint into. */
image = g_image_data_interface->Create(
- g_module_id, PP_IMAGEDATAFORMAT_BGRA_PREMUL, size, PP_TRUE);
+ instance->pp_instance, PP_IMAGEDATAFORMAT_BGRA_PREMUL, size, PP_TRUE);
if (!image)
return;
g_image_data_interface->Describe(image, &image_desc);
@@ -188,8 +187,6 @@ static struct PPP_Instance instance_interface = {
PP_EXPORT int32_t PPP_InitializeModule(PP_Module module,
PPB_GetInterface get_browser_interface) {
- /* Save the global module information for later. */
- g_module_id = module;
g_get_browser_interface = get_browser_interface;
g_core_interface = (const struct PPB_Core*)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698