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

Unified Diff: src/shared/ppapi_proxy/plugin_ppb_gles_extensions.cc

Issue 6579023: Added PPB_GLESChromiumTextureMapping interface. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 9 years, 10 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
Index: src/shared/ppapi_proxy/plugin_ppb_gles_extensions.cc
diff --git a/src/shared/ppapi_proxy/plugin_ppb_gles_extensions.cc b/src/shared/ppapi_proxy/plugin_ppb_gles_extensions.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d300f8654feccd5508eac594328daa623234b4d9
--- /dev/null
+++ b/src/shared/ppapi_proxy/plugin_ppb_gles_extensions.cc
@@ -0,0 +1,50 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "native_client/src/shared/ppapi_proxy/plugin_ppb_gles_extensions.h"
+
+#include "gpu/command_buffer/client/gles2_implementation.h"
+#include "native_client/src/shared/ppapi_proxy/plugin_context_3d.h"
+
+namespace ppapi_proxy {
+
+namespace GLESChromiumTextureMapping {
+
+namespace {
+
+void* MapTexSubImage2DCHROMIUM(
+ PP_Resource context_id,
+ GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ GLenum access) {
+ return PluginResource::GetAs<PluginContext3D>(context_id)->impl()->
+ MapTexSubImage2DCHROMIUM(target, level, xoffset, yoffset, width, height,
+ format, type, access);
+}
+
+void UnmapTexSubImage2DCHROMIUM(PP_Resource context_id, const void* mem) {
+ PluginResource::GetAs<PluginContext3D>(context_id)->impl()->
+ UnmapTexSubImage2DCHROMIUM(mem);
+}
+
+} // namespace
+
+const PPB_GLESChromiumTextureMapping_Dev* GetInterface() {
+ static const struct PPB_GLESChromiumTextureMapping_Dev interface_functions = {
+ &MapTexSubImage2DCHROMIUM,
+ &UnmapTexSubImage2DCHROMIUM
+ };
+ return &interface_functions;
+}
+
+} // namespace GLESChromiumTextureMapping
+
+} // namespace ppapi_proxy
+
« src/shared/ppapi_proxy/plugin_ppb.cc ('K') | « src/shared/ppapi_proxy/plugin_ppb_gles_extensions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698