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

Side by Side Diff: mojo/apps/js/bindings/gl/context.h

Issue 111083005: Beginning of JS Mojo API to GL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make windows link? Created 7 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 | « gin/handle.h ('k') | mojo/apps/js/bindings/gl/context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_APPS_JS_BINDINGS_GL_CONTEXT_H_
6 #define MOJO_APPS_JS_BINDINGS_GL_CONTEXT_H_
7
8 #include <GLES2/gl2.h>
9
10 #include "gin/handle.h"
11 #include "gin/public/wrapper_info.h"
12 #include "gin/wrappable.h"
13 #include "mojo/apps/js/bindings/gl/opaque.h"
14 #include "v8/include/v8.h"
15
16 namespace gin {
17 class Arguments;
18 }
19
20 namespace mojo {
21 namespace js {
22 namespace gl {
23
24 typedef Opaque Shader;
25
26 // Context implements WebGLRenderingContext.
27 class Context : public gin::Wrappable<Context> {
28 public:
29 static gin::WrapperInfo kWrapperInfo;
30
31 static gin::Handle<Context> Create(v8::Isolate* isolate, uint64_t encoded,
32 int width, int height);
33 static v8::Handle<v8::ObjectTemplate> GetObjectTemplate(v8::Isolate* isolate);
34
35 static gin::Handle<Shader> CreateShader(const gin::Arguments& arguments,
36 GLenum type);
37 static void ShaderSource(gin::Handle<Shader> shader,
38 const std::string& source);
39 static void CompileShader(const gin::Arguments& arguments,
40 gin::Handle<Shader> shader);
41
42 private:
43 Context(uint64_t encoded, int width, int height);
44
45 uint64_t encoded_;
46 };
47
48 } // namespace gl
49 } // namespace js
50 } // namespace mojo
51
52 #endif // MOJO_APPS_JS_BINDINGS_GL_CONTEXT_H_
OLDNEW
« no previous file with comments | « gin/handle.h ('k') | mojo/apps/js/bindings/gl/context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698