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

Side by Side Diff: ppapi/shared_impl/opengles2_impl.cc

Issue 8676042: Remove Context3D/Surface3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style Created 9 years 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 | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/shared_impl/resource.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This file is auto-generated from 5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py 6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // DO NOT EDIT! 7 // DO NOT EDIT!
8 8
9 #include "ppapi/shared_impl/opengles2_impl.h" 9 #include "ppapi/shared_impl/opengles2_impl.h"
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "gpu/command_buffer/client/gles2_implementation.h" 12 #include "gpu/command_buffer/client/gles2_implementation.h"
13 #include "ppapi/shared_impl/graphics_3d_impl.h" 13 #include "ppapi/shared_impl/graphics_3d_impl.h"
14 #include "ppapi/thunk/enter.h" 14 #include "ppapi/thunk/enter.h"
15 #include "ppapi/thunk/ppb_context_3d_api.h"
16 15
17 namespace ppapi { 16 namespace ppapi {
18 17
19 namespace { 18 namespace {
20 19
21 gpu::gles2::GLES2Implementation* GetGLES(PP_Resource context) { 20 gpu::gles2::GLES2Implementation* GetGLES(PP_Resource context) {
22 thunk::EnterResource<thunk::PPB_Graphics3D_API> enter_g3d(context, false); 21 thunk::EnterResource<thunk::PPB_Graphics3D_API> enter_g3d(context, false);
23 if (enter_g3d.succeeded()) { 22 DCHECK(enter_g3d.succeeded());
24 return static_cast<Graphics3DImpl*>(enter_g3d.object())->gles2_impl(); 23 return static_cast<Graphics3DImpl*>(enter_g3d.object())->gles2_impl();
25 } else {
26 thunk::EnterResource<thunk::PPB_Context3D_API> enter_c3d(context, true);
27 DCHECK(enter_c3d.succeeded());
28 return enter_c3d.object()->GetGLES2Impl();
29 }
30 } 24 }
31 25
32 void ActiveTexture(PP_Resource context_id, GLenum texture) { 26 void ActiveTexture(PP_Resource context_id, GLenum texture) {
33 GetGLES(context_id)->ActiveTexture(texture); 27 GetGLES(context_id)->ActiveTexture(texture);
34 } 28 }
35 29
36 void AttachShader(PP_Resource context_id, GLuint program, GLuint shader) { 30 void AttachShader(PP_Resource context_id, GLuint program, GLuint shader) {
37 GetGLES(context_id)->AttachShader(program, shader); 31 GetGLES(context_id)->AttachShader(program, shader);
38 } 32 }
39 33
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 &Viewport 889 &Viewport
896 }; 890 };
897 891
898 } // namespace 892 } // namespace
899 893
900 const PPB_OpenGLES2* OpenGLES2Impl::GetInterface() { 894 const PPB_OpenGLES2* OpenGLES2Impl::GetInterface() {
901 return &ppb_opengles2; 895 return &ppb_opengles2;
902 } 896 }
903 897
904 } // namespace ppapi 898 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/shared_impl/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698