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

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: address jam's comments 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 // Helper class for drawing content textures to the UI window surface.
18 class DrawContext {
19 public:
20 DrawContext(ANativeWindow* window);
21 ~DrawContext();
22
23 // Draws the given texture to the UI and returns a
24 // SyncPoint identifier.
25 uint32 Draw(int texture);
26
27 void Reshape(int width, int height);
28
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 } // namespace content
48
49 #endif // CONTENT_SHELL_ANDROID_DRAW_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/public/browser/android/graphics_context.h ('k') | content/shell/android/draw_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698