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

Side by Side Diff: gpu/demos/framework/pepper.cc

Issue 7576012: Removed config management from Graphics3D API. It will be better handled in the EGL helper library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 | ppapi/c/dev/pp_graphics_3d_dev.h » ('j') | ppapi/c/dev/ppb_graphics_3d_dev.h » ('J')
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 #include <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 6
7 #include "gpu/demos/framework/demo.h" 7 #include "gpu/demos/framework/demo.h"
8 #include "gpu/demos/framework/demo_factory.h" 8 #include "gpu/demos/framework/demo_factory.h"
9 #include "ppapi/cpp/completion_callback.h" 9 #include "ppapi/cpp/completion_callback.h"
10 #include "ppapi/cpp/instance.h" 10 #include "ppapi/cpp/instance.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 int32_t attribs[] = { 81 int32_t attribs[] = {
82 PP_GRAPHICS3DATTRIB_ALPHA_SIZE, 8, 82 PP_GRAPHICS3DATTRIB_ALPHA_SIZE, 8,
83 PP_GRAPHICS3DATTRIB_DEPTH_SIZE, 24, 83 PP_GRAPHICS3DATTRIB_DEPTH_SIZE, 24,
84 PP_GRAPHICS3DATTRIB_STENCIL_SIZE, 8, 84 PP_GRAPHICS3DATTRIB_STENCIL_SIZE, 8,
85 PP_GRAPHICS3DATTRIB_SAMPLES, 0, 85 PP_GRAPHICS3DATTRIB_SAMPLES, 0,
86 PP_GRAPHICS3DATTRIB_SAMPLE_BUFFERS, 0, 86 PP_GRAPHICS3DATTRIB_SAMPLE_BUFFERS, 0,
87 PP_GRAPHICS3DATTRIB_WIDTH, size_.width(), 87 PP_GRAPHICS3DATTRIB_WIDTH, size_.width(),
88 PP_GRAPHICS3DATTRIB_HEIGHT, size_.height(), 88 PP_GRAPHICS3DATTRIB_HEIGHT, size_.height(),
89 PP_GRAPHICS3DATTRIB_NONE 89 PP_GRAPHICS3DATTRIB_NONE
90 }; 90 };
91 context_ = pp::Graphics3D_Dev(*this, 0, pp::Graphics3D_Dev(), attribs); 91 context_ = pp::Graphics3D_Dev(*this, pp::Graphics3D_Dev(), attribs);
92 if (context_.is_null()) 92 if (context_.is_null())
93 return; 93 return;
94 94
95 pp::Instance::BindGraphics(context_); 95 pp::Instance::BindGraphics(context_);
96 96
97 glSetCurrentContextPPAPI(context_.pp_resource()); 97 glSetCurrentContextPPAPI(context_.pp_resource());
98 demo_->InitGL(); 98 demo_->InitGL();
99 demo_->Resize(size_.width(), size_.height()); 99 demo_->Resize(size_.width(), size_.height());
100 glSetCurrentContextPPAPI(0); 100 glSetCurrentContextPPAPI(0);
101 } 101 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } // namespace gpu 138 } // namespace gpu
139 139
140 namespace pp { 140 namespace pp {
141 141
142 Module* CreateModule() { 142 Module* CreateModule() {
143 return new gpu::demos::PluginModule(); 143 return new gpu::demos::PluginModule();
144 } 144 }
145 145
146 } // namespace pp 146 } // namespace pp
147 147
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/dev/pp_graphics_3d_dev.h » ('j') | ppapi/c/dev/ppb_graphics_3d_dev.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698