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

Unified Diff: webkit/glue/plugins/pepper_graphics_3d.cc

Issue 4310002: Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on W... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « webkit/glue/plugins/pepper_graphics_2d.cc ('k') | webkit/glue/plugins/pepper_image_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_graphics_3d.cc
===================================================================
--- webkit/glue/plugins/pepper_graphics_3d.cc (revision 65116)
+++ webkit/glue/plugins/pepper_graphics_3d.cc (working copy)
@@ -8,6 +8,7 @@
#include "base/singleton.h"
#include "base/thread_local.h"
#include "ppapi/c/dev/ppb_graphics_3d_dev.h"
+#include "webkit/glue/plugins/pepper_common.h"
#include "webkit/glue/plugins/pepper_plugin_instance.h"
namespace pepper {
@@ -22,24 +23,24 @@
// Size of the transfer buffer.
enum { kTransferBufferSize = 512 * 1024 };
-bool IsGraphics3D(PP_Resource resource) {
- return !!Resource::GetAs<Graphics3D>(resource);
+PP_Bool IsGraphics3D(PP_Resource resource) {
+ return BoolToPPBool(!!Resource::GetAs<Graphics3D>(resource));
}
-bool GetConfigs(int32_t* configs, int32_t config_size, int32_t* num_config) {
+PP_Bool GetConfigs(int32_t* configs, int32_t config_size, int32_t* num_config) {
// TODO(neb): Implement me!
- return false;
+ return PP_FALSE;
}
-bool ChooseConfig(const int32_t* attrib_list, int32_t* configs,
- int32_t config_size, int32_t* num_config) {
+PP_Bool ChooseConfig(const int32_t* attrib_list, int32_t* configs,
+ int32_t config_size, int32_t* num_config) {
// TODO(neb): Implement me!
- return false;
+ return PP_FALSE;
}
-bool GetConfigAttrib(int32_t config, int32_t attribute, int32_t* value) {
+PP_Bool GetConfigAttrib(int32_t config, int32_t attribute, int32_t* value) {
// TODO(neb): Implement me!
- return false;
+ return PP_FALSE;
}
const char* QueryString(int32_t name) {
@@ -80,13 +81,13 @@
return NULL;
}
-bool MakeCurrent(PP_Resource graphics3d) {
+PP_Bool MakeCurrent(PP_Resource graphics3d) {
if (!graphics3d) {
Graphics3D::ResetCurrent();
- return true;
+ return PP_TRUE;
} else {
scoped_refptr<Graphics3D> context(Resource::GetAs<Graphics3D>(graphics3d));
- return context.get() && context->MakeCurrent();
+ return BoolToPPBool(context.get() && context->MakeCurrent());
}
}
@@ -95,9 +96,9 @@
return currentContext ? currentContext->GetReference() : 0;
}
-bool SwapBuffers(PP_Resource graphics3d) {
+PP_Bool SwapBuffers(PP_Resource graphics3d) {
scoped_refptr<Graphics3D> context(Resource::GetAs<Graphics3D>(graphics3d));
- return context && context->SwapBuffers();
+ return BoolToPPBool(context && context->SwapBuffers());
}
uint32_t GetError() {
« no previous file with comments | « webkit/glue/plugins/pepper_graphics_2d.cc ('k') | webkit/glue/plugins/pepper_image_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698