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

Side by Side Diff: content/shell/android/draw_context.h

Issue 10823051: ContentShell rendering support on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_SHELL_ANDROID_DRAW_CONTEXT_H_
6 #define CONTENT_SHELL_ANDROID_DRAW_CONTEXT_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/synchronization/lock.h"
10 #include "ui/gfx/native_widget_types.h"
11
12 #include <GLES2/gl2.h>
13
14 namespace content {
15 class GraphicsContext;
16 };
17
18 // Helper class for drawing content textures to the UI window surface.
19 class DrawContext {
jam 2012/07/27 20:46:29 nit: all new code in content should be in the cont
no sievers 2012/07/31 01:28:44 Done.
20 public:
21 DrawContext(ANativeWindow* window);
22 ~DrawContext();
23
24 // Draws the given texture to the UI and returns a
25 // SyncPoint identifier.
26 uint32 Draw(int texture);
27
28 void Reshape(int width, int height);
29 private:
30 // The shader program.
31 int program_;
32 int vertex_shader_;
33 int fragment_shader_;
34
35 // Shader uniform locations.
36 int texture_uniform_;
37
38 // The vertex attribute array used to draw a simple quad.
39 unsigned int vertex_buffer_;
40
41 // The graphics context used for drawing.
42 scoped_ptr<content::GraphicsContext> context_;
43
44 DISALLOW_COPY_AND_ASSIGN(DrawContext);
45 };
46
47 #endif // CONTENT_SHELL_ANDROID_DRAW_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698