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

Side by Side Diff: cc/output/geometry_binding.h

Issue 14600002: HW draw workarounds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixups to force hw with this patch Created 7 years, 7 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 | « android_webview/lib/main/aw_main_delegate.cc ('k') | cc/output/geometry_binding.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CC_OUTPUT_GEOMETRY_BINDING_H_ 5 #ifndef CC_OUTPUT_GEOMETRY_BINDING_H_
6 #define CC_OUTPUT_GEOMETRY_BINDING_H_ 6 #define CC_OUTPUT_GEOMETRY_BINDING_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 namespace gfx { class RectF; } 10 #include "ui/gfx/rect_f.h"
11 11
12 namespace WebKit { class WebGraphicsContext3D; } 12 namespace WebKit { class WebGraphicsContext3D; }
13 13
14 namespace cc { 14 namespace cc {
15 15
16 class GeometryBinding { 16 class GeometryBinding {
17 public: 17 public:
18 GeometryBinding(WebKit::WebGraphicsContext3D* context, 18 GeometryBinding(WebKit::WebGraphicsContext3D* context,
19 const gfx::RectF& quad_vertex_rect); 19 const gfx::RectF& quad_vertex_rect);
20 ~GeometryBinding(); 20 ~GeometryBinding();
21 21
22 void PrepareForDraw(); 22 void PrepareForDraw();
23 23
24 // All layer shaders share the same attribute locations for the vertex 24 // All layer shaders share the same attribute locations for the vertex
25 // positions and texture coordinates. This allows switching shaders without 25 // positions and texture coordinates. This allows switching shaders without
26 // rebinding attribute arrays. 26 // rebinding attribute arrays.
27 static int PositionAttribLocation() { return 0; } 27 static int PositionAttribLocation() { return 0; }
28 static int TexCoordAttribLocation() { return 1; } 28 static int TexCoordAttribLocation() { return 1; }
29 static int TriangleIndexAttribLocation() { return 2; } 29 static int TriangleIndexAttribLocation() { return 2; }
30 30
31 private: 31 private:
32 const gfx::RectF quad_vertex_rect_;
33
32 WebKit::WebGraphicsContext3D* context_; 34 WebKit::WebGraphicsContext3D* context_;
33 35
34 unsigned quad_vertices_vbo_; 36 unsigned quad_vertices_vbo_;
35 unsigned quad_elements_vbo_; 37 unsigned quad_elements_vbo_;
36 38
37 DISALLOW_COPY_AND_ASSIGN(GeometryBinding); 39 DISALLOW_COPY_AND_ASSIGN(GeometryBinding);
38 }; 40 };
39 41
40 } // namespace cc 42 } // namespace cc
41 43
42 #endif // CC_OUTPUT_GEOMETRY_BINDING_H_ 44 #endif // CC_OUTPUT_GEOMETRY_BINDING_H_
OLDNEW
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | cc/output/geometry_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698