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

Side by Side Diff: ppapi/proxy/ppb_graphics_3d_proxy.cc

Issue 25590002: Release partially constructed GLES2 implementation in Pepper Graphics3D resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" 5 #include "ppapi/proxy/ppb_graphics_3d_proxy.h"
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 #include "gpu/command_buffer/common/command_buffer.h" 8 #include "gpu/command_buffer/common/command_buffer.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/proxy/enter_proxy.h" 10 #include "ppapi/proxy/enter_proxy.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return error_state; 50 return error_state;
51 } 51 }
52 52
53 } // namespace 53 } // namespace
54 54
55 Graphics3D::Graphics3D(const HostResource& resource) 55 Graphics3D::Graphics3D(const HostResource& resource)
56 : PPB_Graphics3D_Shared(resource) { 56 : PPB_Graphics3D_Shared(resource) {
57 } 57 }
58 58
59 Graphics3D::~Graphics3D() { 59 Graphics3D::~Graphics3D() {
60 if (gles2_impl()) 60 DestroyGLES2Impl();
61 DestroyGLES2Impl();
62 } 61 }
63 62
64 bool Graphics3D::Init(gpu::gles2::GLES2Implementation* share_gles2) { 63 bool Graphics3D::Init(gpu::gles2::GLES2Implementation* share_gles2) {
65 PluginDispatcher* dispatcher = PluginDispatcher::GetForResource(this); 64 PluginDispatcher* dispatcher = PluginDispatcher::GetForResource(this);
66 if (!dispatcher) 65 if (!dispatcher)
67 return false; 66 return false;
68 67
69 command_buffer_.reset( 68 command_buffer_.reset(
70 new PpapiCommandBufferProxy(host_resource(), dispatcher)); 69 new PpapiCommandBufferProxy(host_resource(), dispatcher));
71 70
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 int32_t result, 345 int32_t result,
347 const HostResource& context) { 346 const HostResource& context) {
348 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK( 347 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK(
349 API_ID_PPB_GRAPHICS_3D, context, result)); 348 API_ID_PPB_GRAPHICS_3D, context, result));
350 } 349 }
351 #endif // !defined(OS_NACL) 350 #endif // !defined(OS_NACL)
352 351
353 } // namespace proxy 352 } // namespace proxy
354 } // namespace ppapi 353 } // namespace ppapi
355 354
OLDNEW
« 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