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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc

Issue 7736006: Add more functionality to graphics3d test (more to follow...) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h" 7 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h"
8 8
9 #include "gpu/command_buffer/client/gles2_implementation.h" 9 #include "gpu/command_buffer/client/gles2_implementation.h"
10 #include "native_client/src/shared/ppapi_proxy/command_buffer_nacl.h" 10 #include "native_client/src/shared/ppapi_proxy/command_buffer_nacl.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 } // namespace 140 } // namespace
141 141
142 __thread PP_Resource PluginGraphics3D::cached_graphics3d_id = 0; 142 __thread PP_Resource PluginGraphics3D::cached_graphics3d_id = 0;
143 __thread gpu::gles2::GLES2Implementation* 143 __thread gpu::gles2::GLES2Implementation*
144 PluginGraphics3D::cached_implementation = NULL; 144 PluginGraphics3D::cached_implementation = NULL;
145 145
146 PluginGraphics3D::PluginGraphics3D() : instance_id_(0) { } 146 PluginGraphics3D::PluginGraphics3D() : instance_id_(0) { }
147 147
148 PluginGraphics3D::~PluginGraphics3D() { 148 PluginGraphics3D::~PluginGraphics3D() {
149 DebugPrintf("PluginGraphics3D::~PluginGraphics3D()\n");
150 // Explicitly tear down scopted pointers; ordering below matters.
151 gles2_implementation_.reset();
152 gles2_helper_.reset();
153 command_buffer_.reset();
149 // Invalidate the cache. 154 // Invalidate the cache.
150 cached_graphics3d_id = 0; 155 cached_graphics3d_id = 0;
151 cached_implementation = NULL; 156 cached_implementation = NULL;
152 } 157 }
153 158
154 // static 159 // static
155 gpu::gles2::GLES2Implementation* PluginGraphics3D::implFromResourceSlow( 160 gpu::gles2::GLES2Implementation* PluginGraphics3D::implFromResourceSlow(
156 PP_Resource graphics3d_id) { 161 PP_Resource graphics3d_id) {
157 DebugPrintf("PluginGraphics3D::implFromResourceSlow: " 162 DebugPrintf("PluginGraphics3D::implFromResourceSlow: "
158 "resource=%"NACL_PRIu32"\n", graphics3d_id); 163 "resource=%"NACL_PRIu32"\n", graphics3d_id);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 &GetAttribs, 235 &GetAttribs,
231 &SetAttribs, 236 &SetAttribs,
232 &ResizeBuffers, 237 &ResizeBuffers,
233 &SwapBuffs, 238 &SwapBuffs,
234 }; 239 };
235 return &intf; 240 return &intf;
236 } 241 }
237 242
238 } // namespace ppapi_proxy 243 } // namespace ppapi_proxy
239 244
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698