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

Unified Diff: ppapi/proxy/ppb_graphics_3d_proxy.cc

Issue 7457027: Various fixes to Graphics3D proxy to make it work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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/proxy/dispatcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_graphics_3d_proxy.cc
===================================================================
--- ppapi/proxy/ppb_graphics_3d_proxy.cc (revision 94518)
+++ ppapi/proxy/ppb_graphics_3d_proxy.cc (working copy)
@@ -336,6 +336,8 @@
return false;
command_buffer_.reset(new CommandBuffer(host_resource(), dispatcher));
+ if (!command_buffer_->Initialize(kCommandBufferSize))
+ return false;
return CreateGLES2Impl(kCommandBufferSize, kTransferBufferSize);
}
@@ -395,7 +397,8 @@
PPB_Graphics3D_Proxy::PPB_Graphics3D_Proxy(Dispatcher* dispatcher,
const void* target_interface)
- : InterfaceProxy(dispatcher, target_interface) {
+ : InterfaceProxy(dispatcher, target_interface),
+ callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
}
PPB_Graphics3D_Proxy::~PPB_Graphics3D_Proxy() {
@@ -431,12 +434,13 @@
std::vector<int32_t> attribs;
if (attrib_list) {
for (const int32_t* attr = attrib_list;
- *attr != PP_GRAPHICS3DATTRIB_NONE;
- ++attr) {
- attribs.push_back(*attr);
+ attr[0] != PP_GRAPHICS3DATTRIB_NONE;
+ attr += 2) {
+ attribs.push_back(attr[0]);
+ attribs.push_back(attr[1]);
}
- attribs.push_back(PP_GRAPHICS3DATTRIB_NONE);
}
+ attribs.push_back(PP_GRAPHICS3DATTRIB_NONE);
HostResource result;
dispatcher->Send(new PpapiHostMsg_PPBGraphics3D_Create(
@@ -486,7 +490,7 @@
PP_Config3D_Dev config,
const std::vector<int32_t>& attribs,
HostResource* result) {
- if (attribs.empty() || attribs.back() != 0)
+ if (attribs.empty() || attribs.back() != PP_GRAPHICS3DATTRIB_NONE)
return; // Bad message.
EnterFunctionNoLock<ResourceCreationAPI> enter(instance, true);
« no previous file with comments | « ppapi/proxy/dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698